MCPcopy
hub / github.com/celery/celery / set_multiprocessing_start_method

Function set_multiprocessing_start_method

t/integration/test_tasks.py:33–40  ·  view source on GitHub ↗

Set multiprocessing start method to 'fork' if not on Linux.

()

Source from the content-addressed store, hash-verified

31
32
33def set_multiprocessing_start_method():
34 """Set multiprocessing start method to 'fork' if not on Linux."""
35 if platform.system() != "Linux":
36 try:
37 multiprocessing.set_start_method("fork")
38 except RuntimeError:
39 # The method is already set
40 pass
41
42
43class test_class_based_tasks:

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected