-
Notifications
You must be signed in to change notification settings - Fork 484
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
ZMQ_NOBLOCK is deprecated #548
Comments
I found it reading the source code, it's zmq.ZMQ.ZMQ_DONTWAIT. But it should be in Javadoc, not needing to dig in the code. |
Latest code is based on 4.1, please look at http://api.zeromq.org/4-1:zmq-send instead. |
That's the rational for the change, I don't argue about that. But the javadoc should give hint where to look when something is deprecated. Just add a little "changed to DONTWAIT, to comply with 4.1 API", that should be enough. |
Pour la petite histoire, it's part of the C4 explanation by Pieter Hintjens: Jeromq started by implementing 3.x, so NOBLOCK may never have been present, it was already deprecated from the very beginning. More constructively, adding javadoc in send and recv methods may even make more sense, but it would be kinda duplicated in several places: zmq.ZMQ static methods, zmq.SocketBase, org.zeromq.ZMQ.Socket, and I may have forgotten some of them. EDIT: Until now, I focused javadoc writing inside org.zeromq package, that may be enough. |
What does "comply with 4.1 API" mean? Do you refer to the libzmq API? There is no language-neutral API specification AFAIK, so the JeroMQ API can only be "inspired by" some version of the libzmq API. |
In the version 4.1, the constant is called ZMQ_DONTWAIT, in 2.1, it's called ZMQ_NOBLOCK. Jeromq stick to that and they're right. |
Looking at http://api.zeromq.org/2-1:zmq-send, I see that I can have no blocking send using the flag
ZMQ_SNDMORE
. I'm usingZMQ.Socket.send(byte[] data, int flags)
I went hunting for flags value in the javadoc and foundzmq.ZMQ.ZMQ_NOBLOCK
. But it's deprecated. What should I use instead ? It should be in the javadoc.The text was updated successfully, but these errors were encountered: