You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following ExampleApp, I would expect that when the app is quit, the thread worker would terminate too. It does not, and instead the process runs forever.
When I saw that the thread worker does not terminate, my initial thought was perhaps textual failed to set the thread as a daemon, and that this would be an easy fix.
Here's the example code. It continues running even after quitting the app with ctrl-C.
Surprisingly (to me) if I try to minimize the example further, then it starts working as intended and the bug goes away. In the following code, the app successfully quits on ctrl-C. The difference is that the thread worker is in the App rather than in a widget.
I did notice that in #2593@davep notes that long-running thread workers are a bad idea. I haven't looked into alternatives yet. If you have a recommendation or rationale, do let me know.
The text was updated successfully, but these errors were encountered:
In the following ExampleApp, I would expect that when the app is quit, the thread worker would terminate too. It does not, and instead the process runs forever.
When I saw that the thread worker does not terminate, my initial thought was perhaps textual failed to set the thread as a daemon, and that this would be an easy fix.
Here's the example code. It continues running even after quitting the app with ctrl-C.
Surprisingly (to me) if I try to minimize the example further, then it starts working as intended and the bug goes away. In the following code, the app successfully quits on ctrl-C. The difference is that the thread worker is in the App rather than in a widget.
I did notice that in #2593 @davep notes that long-running thread workers are a bad idea. I haven't looked into alternatives yet. If you have a recommendation or rationale, do let me know.
The text was updated successfully, but these errors were encountered: