-
Notifications
You must be signed in to change notification settings - Fork 634
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
DISH socket not working with asyncio context #1139
Comments
I'm also getting this exception when the application closes.
|
do DISH sockets not have zmq.FD? If so, then they cannot be used with asyncio. |
@minrk How do I find out? |
Looks like it was an explicit design choice in libzmq to not support ZMQ_FD (zeromq/libzmq#2941) in new threadsafe sockets (server/client, radio/dish, scatter/gather). Until that's fixed, you won't be able to use these sockets with asyncio or tornado. I wouldn't recommend using any of the draft-api sockets in production. |
Like you mentioned in the libzmq issue it's pretty important for the final version of the sockets to expose a way for event loops to work with them. Until then I recommend we keep this issue open. Thanks for your help. EDIT: The docs should be updated in order to reflect the current status. If you like I could update them and make a pull request. |
Adding a note to draft support that libzmq draft sockets cannot be used with eventloops would be worthwhile. Thanks! |
Was poking around with RADIO/DISH and asyncio, stumbled onto this issue. |
Yes, still an issue and no indication of progress. It's a tricky problem and someone needs to implement it in libzmq. |
Hi, |
This is a feature request for libzmq to implement event-loop-supporting handles for sockets. Until they address that, there isn't really anything pyzmq or users can do, other than do blocking calls in background threads. If DISH sockets get ZMQ_FD support, it should work with asyncio without any changes to pyzmq. If they choose to go another way, it might require some code in pyzmq to deal with it. There is a proposal that sounds like it would work, to me, but someone has to implement it in libzmq. |
Thanks for explaining that @minrk, |
Found: zeromq/libzmq#2941 |
Hi,
I'm trying to initialise a DISH socket using
zmq.asyncio.Context
fails with:The code i'm using is:
Initialising the socket with
zmq.Context
works as intended.System Info:
The text was updated successfully, but these errors were encountered: