Skip to content

Commit

Permalink
Cancel stdin_reader_task after asyncio gor stops
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Aug 13, 2022
1 parent 61ce096 commit d2ddecd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gor/asyncio_impl.py
Expand Up @@ -45,7 +45,8 @@ async def _run(self):
t = self.io_loop.create_task(self._worker())
self.tasks.append(t)

self.io_loop.create_task(self._stdin_reader())
stdin_reader_task = self.io_loop.create_task(self._stdin_reader())
self.tasks.append(stdin_reader_task)

def _stop(self):
for t in self.tasks:
Expand Down

0 comments on commit d2ddecd

Please sign in to comment.