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

Make try_recv do what you expect #10139

Closed
brson opened this issue Oct 29, 2013 · 3 comments
Closed

Make try_recv do what you expect #10139

brson opened this issue Oct 29, 2013 · 3 comments

Comments

@brson
Copy link
Contributor

brson commented Oct 29, 2013

The obvious semantics for try_recv is to return a message or return immediately if none is available (i.e. peek + recv). That's not what it does though; instead it blocks waiting for a message and returns None when the sender closes the channel.

cc #10138

Nominating.

@brson
Copy link
Contributor Author

brson commented Oct 29, 2013

Could possibly get rid of peek then if nobody is using it for anything other than peek + recv.

@pnkfelix
Copy link
Member

pnkfelix commented Nov 7, 2013

Delegating to @alexcrichton as well.

@alexcrichton
Copy link
Member

Closing in favor of #10459

flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 12, 2023
…Jarcho

chore: fix identation of `if_chain` in `filter_map`

This is a really small fix.
If someone could take a look at it, I would appreciate it:pray:

---

changelog: none
<!-- changelog_checked -->
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

3 participants