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

Method get_nowait

Lib/concurrent/interpreters/_queues.py:272–285  ·  view source on GitHub ↗

Return the next object from the channel. If the queue is empty then raise QueueEmpty. Otherwise this is the same as get().

(self)

Source from the content-addressed store, hash-verified

270 return obj
271
272 def get_nowait(self):
273 """Return the next object from the channel.
274
275 If the queue is empty then raise QueueEmpty. Otherwise this
276 is the same as get().
277 """
278 try:
279 obj, unboundop = _queues.get(self._id)
280 except QueueEmpty:
281 raise # re-raise
282 if unboundop is not None:
283 assert obj is None, repr(obj)
284 return _resolve_unbound(unboundop)
285 return obj
286
287
288_queues._register_heap_types(Queue, QueueEmpty, QueueFull)

Callers 5

getMethod · 0.95
_workerFunction · 0.45
_initializer_failedMethod · 0.45
shutdownMethod · 0.45

Calls 2

_resolve_unboundFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected