MCPcopy
hub / github.com/dask/dask / get_context

Function get_context

dask/multiprocessing.py:133–144  ·  view source on GitHub ↗

Return the current multiprocessing context.

()

Source from the content-addressed store, hash-verified

131
132
133def get_context():
134 """Return the current multiprocessing context."""
135 # fork context does fork()-without-exec(), which can lead to deadlocks,
136 # so default to "spawn".
137 context_name = config.get("multiprocessing.context", "spawn")
138 if sys.platform == "win32":
139 if context_name != "spawn":
140 # Only spawn is supported on Win32, can't change it:
141 warn(_CONTEXT_UNSUPPORTED, UserWarning)
142 return multiprocessing
143 else:
144 return multiprocessing.get_context(context_name)
145
146
147def get(

Callers 4

getFunction · 0.85

Calls 2

warnFunction · 0.85
getMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…