-
Notifications
You must be signed in to change notification settings - Fork 637
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
Copied patch from Pawel Subocz to add poll support to zmq.green. #210
Conversation
try: | ||
select.select(rlist, wlist, xlist) | ||
except select.error, ex: | ||
raise zmq.ZMQError(*ex.args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to wrap this in a ZMQError, when it isn't one? Also, I don't think this will even work, because the signatures probably don't match. I would just let any error here raise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm good point, removed.
…s. Mixed in existing poll tests in a green fashion.
s = gevent.spawn(lambda: s1.send(b'msg1')) | ||
r.join() | ||
toc = time.time() | ||
self.assertTrue(toc-tic < 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test isn't right. Since you registered s1 with POLLOUT, poller.poll() will always return immediately as s1 can always send. This should only test should only register s2.
Looks good, merging. Thanks! |
Copied patch from Pawel Subocz to add poll support to zmq.green.
Take 2, sorry about the dup PR, my git fu is still weak.