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

Zpoller test #402

Merged
merged 2 commits into from
Feb 27, 2017
Merged

Zpoller test #402

merged 2 commits into from
Feb 27, 2017

Conversation

fredoboulo
Copy link
Contributor

No description provided.

@daveyarwood
Copy link
Contributor

daveyarwood commented Feb 22, 2017

Looks good! I think this may close #395. Are these tests modeled after the ZMQ.Poller tests?

Also, food for thought: in the spirit of #387, we might consider removing the ZPoller constructors that don't require you to supply a context. To ensure selector resources are freed, all selectors should be created via a context.

@trevorbernard trevorbernard merged commit f7a9d0d into zeromq:master Feb 27, 2017
@daveyarwood
Copy link
Contributor

Also, food for thought: in the spirit of #387, we might consider removing the ZPoller constructors that don't require you to supply a context. To ensure selector resources are freed, all selectors should be created via a context.

On second thought, after looking at the ZPoller code more closely, it seems like we're already doing sane things with selector resources here. Every ZPoller constructor requires either a ZContext, a selector, or an existing ZPoller to shadow. Supplying your own selector implies that you have access to the selector and can close it yourself. If you don't want to have to worry about that, you can pass in a ZContext instead, and the context will create and manage the selector for you.

@fredoboulo fredoboulo deleted the zpoller-tests branch March 2, 2017 13:46
@fredoboulo
Copy link
Contributor Author

I would keep that part like that for the time being.

My thinking now would be to settle a clearer API: there are a lot of methods isReadable, readable, pollin, ... that are doing exactly the same work, mostly because I still cannot decide whether to stick with old methods naming (pollxxx) and new naming (read/writ[able]) I introduced.

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.

4 participants