Skip to content

Commit f76a5bc

Browse files
committed
fix is_running()
was always False (when running async). Oops.
1 parent 316e4e5 commit f76a5bc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

trio_asyncio/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,11 @@ async def _main_loop_exit(self):
723723
self._nursery = None
724724
self._task = None
725725

726+
def is_running(self):
727+
if self._stopped is None:
728+
return False
729+
return not self._stopped.is_set()
730+
726731
def run_forever(self):
727732
"""asyncio's method to run the loop until it is stopped.
728733
"""

0 commit comments

Comments
 (0)