-
Notifications
You must be signed in to change notification settings - Fork 56
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
stream.write() prevents Python process from terminating after loop clean up using task cancellation #61
Comments
Using gdb, I found what is blocking after my code has finished.
|
Hmm. Looks interesting. |
Oh, I just googled a bit and experimented another bit, and found that setting LINGER option resolves this problem. It seems that the underlying TCP connection was not established (because I'm using a wrong address intentionally) and the followed write call makes the termination process of libzmq to poll availability of the TCP connection internally. |
Therefore, this is not the "fault" of aiozmq at all; I'm closing the issue. :) |
write()
calls to an aiozmq stream prevent "clean termination" of the Python process.Here is a minimal working example:
The result when you press Ctrl+C during sleep is:
Is there any way to correctly interrupt/cancel the background behavior of
write()
calls?The text was updated successfully, but these errors were encountered: