MCPcopy Index your code
hub / github.com/python/cpython / get_context

Method get_context

Lib/multiprocessing/context.py:196–204  ·  view source on GitHub ↗
(self, method=None)

Source from the content-addressed store, hash-verified

194 set_forkserver_preload(module_names, on_error=on_error)
195
196 def get_context(self, method=None):
197 if method is None:
198 return self
199 try:
200 ctx = _concrete_contexts[method]
201 except KeyError:
202 raise ValueError('cannot find context for %r' % method) from None
203 ctx._check_available()
204 return ctx
205
206 def get_start_method(self, allow_none=False):
207 return self._name

Callers 15

ManagerMethod · 0.95
LockMethod · 0.95
RLockMethod · 0.95
ConditionMethod · 0.95
SemaphoreMethod · 0.95
BoundedSemaphoreMethod · 0.95
EventMethod · 0.95
BarrierMethod · 0.95
QueueMethod · 0.95
JoinableQueueMethod · 0.95
SimpleQueueMethod · 0.95
PoolMethod · 0.95

Calls 1

_check_availableMethod · 0.45

Tested by

no test coverage detected