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

Deprecation of poll(std::vector<zmq_pollitem_t> &items) #494

Closed
yuyichao opened this issue Jun 26, 2021 · 2 comments
Closed

Deprecation of poll(std::vector<zmq_pollitem_t> &items) #494

yuyichao opened this issue Jun 26, 2021 · 2 comments

Comments

@yuyichao
Copy link

In #415 (b0e7243) poll(std::vector<zmq_pollitem_t> &items, long timeout_) is deprecated. I think this is fine but it also cause a deprecation warning if no timeout is given.

Is this deprecation intentional? If so, what will be the new way of specifying no timeout? It seems that the way to do it right now is either to call poll(zmq_pollitem_t *items_, size_t nitems_, long timeout_ = -1) (or zmq_poll) manually, or to pass an exactly -1ms timeout. Both of these solutions feels very wrong.

If this deprecation isn't intentional, a separate function poll(std::vector<zmq_pollitem_t> &items) should be added to suppress the warning.

@gummif
Copy link
Member

gummif commented Jun 29, 2021

Yes this is unfortunate. The timeout parameters should probably have a default value of milliseconds{-1}, and change the long timeout version to not have a default value.

@gummif
Copy link
Member

gummif commented Jun 29, 2021

See #497 for proposed change

@gummif gummif closed this as completed Aug 13, 2021
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

No branches or pull requests

2 participants