Closed Fuyukai closed 7 years ago
A bit curious to get more information. Are the threads waiting on a Curio condition variable or an external one? It's my goal for async threads to be cancellable like normal Curio tasks--although that only works if they're blocked waiting for something in the context of Curio though.
In any case, will look at the daemon status further...
They're waiting on a curio condition value.
Hmmm. So the idea is that they'd just die the same way a normal daemonic task would then? I will look into this. It's slightly tricky since every async thread consists of both a Curio task and a real-life thread at the same time. It seems as if this should be possible though.
Pushed some changes related to this. Give it a whirl.
This seems to kill as expected without having to do anything hacky, thanks!
I have a few async threads that I want to die when I kill my application, instead of waiting the ~40 or so seconds on a condition that will never be set. It would be great if using just the decorator I could mark these as daemon instead of having to reboot the kernel and kill them manually.
Additionally, the
daemon
property of these async threads don't seem to be used - they're not passed to the underlyingthreading.Thread
.