(self)
| 72 | self._reader, self._writer = mp.Pipe(duplex=False) |
| 73 | |
| 74 | def close(self): |
| 75 | # Please note that we do not take the self._lock when |
| 76 | # calling clear() (to avoid deadlocking) so this method can |
| 77 | # only be called safely from the same thread as all calls to |
| 78 | # clear() even if you hold the lock. Otherwise we |
| 79 | # might try to read from the closed pipe. |
| 80 | with self._lock: |
| 81 | if not self._closed: |
| 82 | self._closed = True |
| 83 | self._writer.close() |
| 84 | self._reader.close() |
| 85 | |
| 86 | def wakeup(self): |
| 87 | with self._lock: |
no outgoing calls
no test coverage detected