Return True if the queue is full, False otherwise (not reliable!). This method is likely to be removed at some point. Use qsize() >= n as a direct substitute, but be aware that either approach risks a race condition where a queue can shrink before the result of full() o
(self)
| 109 | return not self._qsize() |
| 110 | |
| 111 | def full(self): |
| 112 | '''Return True if the queue is full, False otherwise (not reliable!). |
| 113 | |
| 114 | This method is likely to be removed at some point. Use qsize() >= n |
| 115 | as a direct substitute, but be aware that either approach risks a race |
| 116 | condition where a queue can shrink before the result of full() or |
| 117 | qsize() can be used. |
| 118 | ''' |
| 119 | with self.mutex: |
| 120 | return 0 < self.maxsize <= self._qsize() |
| 121 | |
| 122 | def put(self, item, block=True, timeout=None): |
| 123 | '''Put an item into the queue. |