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

Add send_ready #3019

Closed
eholk opened this issue Jul 25, 2012 · 5 comments
Closed

Add send_ready #3019

eholk opened this issue Jul 25, 2012 · 5 comments
Labels
A-concurrency Area: Concurrency C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. P-low Low priority

Comments

@eholk
Copy link
Contributor

eholk commented Jul 25, 2012

This would take a set of channels and send on one of the ready ones.

We don't really have a notion yet of ready channels, but we could probably build a buffered_stream protocol that would include acknowledgments. This would be helpful for a few things, I imagine.

Part of #1255.

@ghost ghost assigned eholk Jul 26, 2012
@bblum
Copy link
Contributor

bblum commented Jun 21, 2013

Couldn't a user implement this with something like for list.each |chan| { if chan.try_send(msg) { return true; } } return false; ? Like #3018 I don't think this needs to be a primitive.

@bblum
Copy link
Contributor

bblum commented Aug 2, 2013

try_send is a different concept actually; this would have to be a primitive.

@pnkfelix
Copy link
Member

Accepting P-low.

@eholk eholk removed their assignment Jun 16, 2014
@tomjakubowski
Copy link
Contributor

Would this be a function on &[SyncSender<T>]?

@alexcrichton
Copy link
Member

Closing.

See this comment: #3020 (comment)

bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 11, 2023
[perf] Reserve capacity for argvs.

This avoids unnecessary allocations to grow vector to sufficient size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: Concurrency C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. P-low Low priority
Projects
None yet
Development

No branches or pull requests

5 participants