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

Reintroduce std::comm::Handle.try_recv() #12219

Closed

Conversation

lilyball
Copy link
Contributor

No description provided.

@lilyball
Copy link
Contributor Author

r? @alexcrichton

@lilyball
Copy link
Contributor Author

As near as I can tell, try_recv() should be safe to call from Handle, because all 3 implementations of Port call it from within their .recv() impl. So I have to assume that the removal of it from Handle was just an accidental by-product of the rewrite and not some safety thing.

@alexcrichton
Copy link
Member

Closing, this isn't quite what I was intending with select currently. The recv/recv_opt methods are used as part of the macro invocation, and a try_recv method being present means that you can select over try_recv which is kinda weird.

The ports no longer take a mutable loan, but rather an immutable one, so you still have access to the original port.

@lilyball lilyball deleted the comm-select-handle-try-recv branch February 12, 2014 22:16
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 8, 2024
Avoid deleting labeled blocks

Fix rust-lang#11575.

changelog: [`unnecessary_operation`]: skip labeled blocks
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