mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-84559: Deprecate fork being the multiprocessing default. (#100618)
This starts the process. Users who don't specify their own start method and use the default on platforms where it is 'fork' will see a DeprecationWarning upon multiprocessing.Pool() construction or upon multiprocessing.Process.start() or concurrent.futures.ProcessPool use. See the related issue and documentation within this change for details.
This commit is contained in:
parent
618b7a8260
commit
0ca67e6313
16 changed files with 284 additions and 63 deletions
|
@ -4759,8 +4759,9 @@ class LogRecordTest(BaseTest):
|
|||
# In other processes, processName is correct when multiprocessing in imported,
|
||||
# but it is (incorrectly) defaulted to 'MainProcess' otherwise (bpo-38762).
|
||||
import multiprocessing
|
||||
parent_conn, child_conn = multiprocessing.Pipe()
|
||||
p = multiprocessing.Process(
|
||||
mp = multiprocessing.get_context('spawn')
|
||||
parent_conn, child_conn = mp.Pipe()
|
||||
p = mp.Process(
|
||||
target=self._extract_logrecord_process_name,
|
||||
args=(2, LOG_MULTI_PROCESSING, child_conn,)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue