Use a fifo lock for IPC

remote_task_cancelling
Tyler Goodlet 2018-12-15 02:20:19 -05:00
parent d492236f3a
commit db85e13657
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class StreamQueue:
self._agen = self._iter_packets() self._agen = self._iter_packets()
self._laddr = self.stream.socket.getsockname()[:2] self._laddr = self.stream.socket.getsockname()[:2]
self._raddr = self.stream.socket.getpeername()[:2] self._raddr = self.stream.socket.getpeername()[:2]
self._send_lock = trio.Lock() self._send_lock = trio.StrictFIFOLock()
async def _iter_packets(self) -> typing.AsyncGenerator[dict, None]: async def _iter_packets(self) -> typing.AsyncGenerator[dict, None]:
"""Yield packets from the underlying stream. """Yield packets from the underlying stream.