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.
(self)
| 112 | return not self._queue |
| 113 | |
| 114 | def full(self): |
| 115 | """Return True if there are maxsize items in the queue. |
| 116 | |
| 117 | Note: if the Queue was initialized with maxsize=0 (the default), |
| 118 | then full() is never True. |
| 119 | """ |
| 120 | if self._maxsize <= 0: |
| 121 | return False |
| 122 | else: |
| 123 | return self.qsize() >= self._maxsize |
| 124 | |
| 125 | async def put(self, item): |
| 126 | """Put an item into the queue. |