Skip to content

Commit

Permalink
Dont stop asyncio loop when interactive (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein authored Nov 13, 2024
1 parent 7ba504c commit a8ddf97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rendercanvas/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _rc_stop(self):
class AsyncioLoop(BaseLoop):
_TimerClass = AsyncioTimer
_the_loop = None
_is_interactive = False
_is_interactive = True # When run() is not called, assume interactive

@property
def _loop(self):
Expand All @@ -67,6 +67,7 @@ def _rc_run(self):
def _rc_stop(self):
if not self._is_interactive:
self._loop.stop()
self._is_interactive = True

def _rc_call_soon(self, callback, *args):
self._loop.call_soon(callback, *args)
Expand Down

0 comments on commit a8ddf97

Please sign in to comment.