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

Single Evented on more than on Poll #674

Closed
dtolnay opened this Issue Aug 18, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@dtolnay
Copy link

dtolnay commented Aug 18, 2017

Question from i.r-l.o:

Can a single Evented be registered on more than one Poll? What happens? The documentation doesn’t seem to clearly say anything.

@cramertj

This comment has been minimized.

Copy link
Contributor

cramertj commented Aug 23, 2017

This comment in the Unix implementation says that only one poll registration per Evented is supported:

/// Each Selector has a globally unique(ish) ID associated with it. This ID
/// gets tracked by `TcpStream`, `TcpListener`, etc... when they are first
/// registered with the `Selector`. If a type that is previously associated with
/// a `Selector` attempts to register itself with a different `Selector`, the
/// operation will return with an error. This matches windows behavior.
@carllerche

This comment has been minimized.

Copy link
Owner

carllerche commented Aug 23, 2017

Yes, Evented values can only be registered with a single Poll instance ever (even if the value is deregistered). There are non-portable work arounds (like using a FD directly).

@tobz tobz closed this Nov 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.