asyncio.Queue.put_nowait()

put_nowait(item) Put an item into the queue without blocking. If no free slot is immediately available, raise QueueFull.

asyncio.Queue.put()

coroutine put(item) Put an item into the queue. If the queue is full, wait until a free slot is available before adding item. This method is a coroutine. See also The full() method.

asyncio.Queue.maxsize

maxsize Number of items allowed in the queue.

asyncio.Queue.join()

coroutine join() Block until all items in the queue have been gotten and processed. The count of unfinished tasks goes up whenever an item is added to the queue. The count goes down whenever a consumer thread calls task_done() to indicate that the item was retrieved and all work on it is complete. When the count of unfinished tasks drops to zero, join() unblocks. This method is a coroutine. New in version 3.4.4.

asyncio.Queue.get_nowait()

get_nowait() Remove and return an item from the queue. Return an item if one is immediately available, else raise QueueEmpty.

asyncio.Queue.get()

coroutine get() Remove and return an item from the queue. If queue is empty, wait until an item is available. This method is a coroutine. See also The empty() method.

asyncio.Queue.full()

full() Return True if there are maxsize items in the queue. Note If the Queue was initialized with maxsize=0 (the default), then full() is never True.

asyncio.Queue.empty()

empty() Return True if the queue is empty, False otherwise.

asyncio.Queue

class asyncio.Queue(maxsize=0, *, loop=None) A queue, useful for coordinating producer and consumer coroutines. If maxsize is less than or equal to zero, the queue size is infinite. If it is an integer greater than 0, then yield from put() will block when the queue reaches maxsize, until an item is removed by get(). Unlike the standard library queue, you can reliably know this Queue’s size with qsize(), since your single-threaded asyncio application won’t be interrupted between calling qsize

asyncio.Protocol.eof_received()

Protocol.eof_received() Calls when the other end signals it won’t send any more data (for example by calling write_eof(), if the other end also uses asyncio). This method may return a false value (including None), in which case the transport will close itself. Conversely, if this method returns a true value, closing the transport is up to the protocol. Since the default implementation returns None, it implicitly closes the connection. Note Some transports such as SSL don’t support half-clos