(self, obj, block=True, timeout=None)
| 82 | self._poll = self._reader.poll |
| 83 | |
| 84 | def put(self, obj, block=True, timeout=None): |
| 85 | if self._closed: |
| 86 | raise ValueError(f"Queue {self!r} is closed") |
| 87 | if not self._sem.acquire(block, timeout): |
| 88 | raise Full |
| 89 | |
| 90 | with self._notempty: |
| 91 | if self._thread is None: |
| 92 | self._start_thread() |
| 93 | self._buffer.append(obj) |
| 94 | self._notempty.notify() |
| 95 | |
| 96 | def get(self, block=True, timeout=None): |
| 97 | if self._closed: |
no test coverage detected