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

Method put_nowait

Lib/asyncio/queues.py:156–170  ·  view source on GitHub ↗

Put an item into the queue without blocking. If no free slot is immediately available, raise QueueFull. Raises QueueShutDown if the queue has been shut down.

(self, item)

Source from the content-addressed store, hash-verified

154 return self.put_nowait(item)
155
156 def put_nowait(self, item):
157 """Put an item into the queue without blocking.
158
159 If no free slot is immediately available, raise QueueFull.
160
161 Raises QueueShutDown if the queue has been shut down.
162 """
163 if self._is_shutdown:
164 raise QueueShutDown
165 if self.full():
166 raise QueueFull
167 self._put(item)
168 self._unfinished_tasks += 1
169 self._finished.clear()
170 self._wakeup_next(self._getters)
171
172 async def get(self):
173 """Remove and return an item from the queue.

Calls 4

fullMethod · 0.95
_putMethod · 0.95
_wakeup_nextMethod · 0.95
clearMethod · 0.45