-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hang on Windows when closing the last window #15
Comments
FYI, I launched the application and closed the window and it terminated. This was on Kubuntu 16.04 with latest qt5reactor (4f6d592).
|
Yes: I tested it on Ubuntu 16.04 xenial64, as well.
Le 11 sept. 2017 21 h 51, "Kyle Altendorf" <[email protected]> a
écrit :
… FYI, I launched the application and closed the window and it terminated.
This was on Kubuntu 16.04 with latest qt5reactor (4f6d592
<4f6d592>
).
***@***.***:~/aalex$ venv/bin/python -m pip freeze
attrs==17.2.0
Automat==0.6.0
constantly==15.1.0
hyperlink==17.3.1
incremental==17.5.0
PyQt5==5.9
qt5reactor==0.4
sip==4.19.3
six==1.10.0
Twisted==17.5.0
zope.interface==4.4.2
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#15 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAR7LdkIxzcYevM9n699QlX5n_JbCWOBks5sheO6gaJpZM4PT0xl>
.
|
According to the docstring (and confirmed by the code), "calling reactor.stop() will unhook twisted but leave your Qt application running". To me, this suggests that calling That said, changing the gist's |
CloseEvent() when called , if you already have a deferred thread running then the on reactor.stop() the thread still keeps running even on close event. The cleanest way is |
I'm adding a twisted app to my Qt5 GUI application and the following works for me:
So it seems like I'm still not doing something right. Without the _stopThreadPool() command, my application hangs on sys.exit(0). I replaced the sys.exit() w/ os._exit() and that now gives me a clean exit w/no need for a reactor.stop. I don't really understand why this works and sys.exit() does not, but at least it works. |
Using the qt5reactor with pyqt5 on Windows 7, the Python script hangs once we closed the window.
Here is a code example: https://gist.github.com/aalex/c469f7031e2747e1fec9a64536fb0917
The text was updated successfully, but these errors were encountered: