Repos / mcross / 21af84ffb3
commit 21af84ffb37529ac99a3fcd095c0215a9cc5e155
Author: Bùi Thành Nhân <hi@imnhan.com>
Date: Sun May 17 12:02:24 2020 +0700
tell curio we don't need to join()
So it doesn't spam the "task never joined" warning.
diff --git a/src/mcross/gui/controller.py b/src/mcross/gui/controller.py
index 0e4bf45..1e90538 100644
--- a/src/mcross/gui/controller.py
+++ b/src/mcross/gui/controller.py
@@ -28,7 +28,9 @@ def __init__(self):
def schedule_as_coro(func):
def do_schedule(*args):
- task = curio.spawn(self.show_waiting_cursor_during_task(func, *args))
+ task = curio.spawn(
+ self.show_waiting_cursor_during_task(func, *args), daemon=True
+ )
self.pending_coros.append(task)
return do_schedule