Skip to content
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

Merged
merged 6 commits into from
Jun 18, 2012

Conversation

michelp
Copy link
Contributor

@michelp michelp commented May 29, 2012

Take 2, sorry about the dup PR, my git fu is still weak.

try:
select.select(rlist, wlist, xlist)
except select.error, ex:
raise zmq.ZMQError(*ex.args)
Copy link
Member

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.

Copy link
Contributor Author

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 = gevent.spawn(lambda: s1.send(b'msg1'))
r.join()
toc = time.time()
self.assertTrue(toc-tic < 1)
Copy link
Member

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.

@minrk
Copy link
Member

minrk commented Jun 18, 2012

Looks good, merging.

Thanks!

minrk added a commit that referenced this pull request Jun 18, 2012
Copied patch from Pawel Subocz to add poll support to zmq.green.
@minrk minrk merged commit 145613e into zeromq:master Jun 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants