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

Function create

Lib/concurrent/interpreters/_queues.py:65–79  ·  view source on GitHub ↗

Return a new cross-interpreter queue. The queue may be used to pass data safely between interpreters. "unbounditems" sets the default for Queue.put(); see that method for supported values. The default value is UNBOUND, which replaces the unbound item.

(maxsize=0, *, unbounditems=UNBOUND)

Source from the content-addressed store, hash-verified

63
64
65def create(maxsize=0, *, unbounditems=UNBOUND):
66 """Return a new cross-interpreter queue.
67
68 The queue may be used to pass data safely between interpreters.
69
70 "unbounditems" sets the default for Queue.put(); see that method for
71 supported values. The default value is UNBOUND, which replaces
72 the unbound item.
73 """
74 unbound = _serialize_unbound(unbounditems)
75 unboundop, = unbound
76 qid = _queues.create(maxsize, unboundop, -1)
77 self = Queue(qid)
78 self._set_unbound(unboundop, unbounditems)
79 return self
80
81
82def list_all():

Callers

nothing calls this directly

Calls 4

_serialize_unboundFunction · 0.70
QueueClass · 0.70
createMethod · 0.45
_set_unboundMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…