Fix bug where _unblock() would fail on a stopped thread
This commit is contained in:
parent
447b9ecbc3
commit
d4a6fe8f49
@ -43,6 +43,6 @@ class PipeWriterThread(Thread):
|
|||||||
|
|
||||||
def _unblock(self):
|
def _unblock(self):
|
||||||
self._write_queue.push_front(None)
|
self._write_queue.push_front(None)
|
||||||
with suppress(OSError):
|
with suppress(OSError, TypeError):
|
||||||
while read(self._drain_fd, 65536):
|
while read(self._drain_fd, 65536):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user