Open glycerine opened 10 years ago
I need this too. A pull request for polling was accepted and merged a year ago, but there is no mention of polling in the cran documentation pdf, and the github readme for the project states there is no polling support. So I'm not sure what the current status is.
I site the current code above (see line marked <<<<<<<<<<<<<<< here, in receiveSocket(), line 282 ). There is no way at present to set the flag from R.
That should be an easy change.
I'll try to patch by this weekend.
The original polling code for this was accepted w/out any documentation contribution. I haven't tested it myself.
Thanks Whit! That would be great. Do you know how the CRAN release works? It would be great to be able to update rzmq there. I'm happy to help test any new patch if you'd like.
Also, thank you @memeplex, for pointing out the poll.socket() implementation available from the current github head (but not avail in CRAN, yet). I prefer using receiveSocket() because that is what I'm used to, and it is much simpler. Although it is good to know about poll.socket().
Yes, I can do the CRAN release. I'm still the package maintainer.
I think it makes sense to get these updates in place first, so if you want to submit a patch for that go ahead. Otherwise, I think I'll have some bandwidth this weekend to work on it.
Agreed. Better to patch first, then release. I'll try to put a patch together for your review.
pull request available: https://github.com/armstrtw/rzmq/pull/10
I'd like to be able to pass ZMQ_DONTWAIT to the socket->recv() call in receiveSocket, in order to be able to poll but not block if no message is availble.
Since R is not very thread friendly, non-blocking polling is very useful for implementing a server.
Would you consider adding the ability to pass flags to socket->recv() ? Is it is, the flags_ parameter is always defaulted to zero.
Thanks!
Jason