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

Method prepare

Lib/concurrent/futures/thread.py:50–58  ·  view source on GitHub ↗
(cls, initializer, initargs)

Source from the content-addressed store, hash-verified

48
49 @classmethod
50 def prepare(cls, initializer, initargs):
51 if initializer is not None:
52 if not callable(initializer):
53 raise TypeError("initializer must be a callable")
54 def create_context():
55 return cls(initializer, initargs)
56 def resolve_task(fn, args, kwargs):
57 return (fn, args, kwargs)
58 return create_context, resolve_task
59
60 def __init__(self, initializer, initargs):
61 self.initializer = initializer

Callers 1

prepare_contextMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected