Skip to content

Commit a8ddf97

Browse files
authored
Dont stop asyncio loop when interactive (#19)
1 parent 7ba504c commit a8ddf97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rendercanvas/asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _rc_stop(self):
4040
class AsyncioLoop(BaseLoop):
4141
_TimerClass = AsyncioTimer
4242
_the_loop = None
43-
_is_interactive = False
43+
_is_interactive = True # When run() is not called, assume interactive
4444

4545
@property
4646
def _loop(self):
@@ -67,6 +67,7 @@ def _rc_run(self):
6767
def _rc_stop(self):
6868
if not self._is_interactive:
6969
self._loop.stop()
70+
self._is_interactive = True
7071

7172
def _rc_call_soon(self, callback, *args):
7273
self._loop.call_soon(callback, *args)

0 commit comments

Comments
 (0)