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

Getting E back from reactor::poll_evented::PollEvented<E> #268

Open
baloo opened this issue Oct 22, 2017 · 1 comment
Open

Getting E back from reactor::poll_evented::PollEvented<E> #268

baloo opened this issue Oct 22, 2017 · 1 comment

Comments

@baloo
Copy link

baloo commented Oct 22, 2017

my use case is:

  • create a socket with a lib
  • set socket in non-blocking
  • connect the socket
  • register socket with tokio (with PollEvented).
  • once socket is connected, deregister the socket from tokio.
  • mess with the socket (with the lib)
  • once mess is done,
  • register the socket again with tokio

the PollEvented<E>.deregister signature is deregister(self, handle: &Handle) -> Result<()>, so once my socket is registered with PollEvented I can't have it back.

I'd like deregister to look like this instead:
deregister(self, handle: &Handle) -> Result<E>

@alexcrichton
Copy link
Contributor

Thanks for the report! I think this definitely makes sense to solve in the tokio-rs/tokio-rfcs#3 design!

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