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_all for pipes #3020

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

Add send_all for pipes #3020

eholk opened this issue Jul 25, 2012 · 9 comments
Labels
A-concurrency Area: Concurrency related issues. 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 might also be called broadcast.

Part of #1255.

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

bblum commented Jun 21, 2013

I'm not sure I follow what this would mean -- pipes are 1-1, so either this means sending on multiple pipes (which can be done with a vector iteration and doesn't need to be a primitive), or sending on a pipe whose other endpoint is a SharedChan. Conceivably this could mean iterating a try_send until it fails, but there's no way for a Port to know if its Chan is shared or not, let alone atomically make sure a woken receiver doesn't receive again before the broadcast is finished.

@eholk
Copy link
Contributor Author

eholk commented Jun 21, 2013

If I recall correctly, send_all is "send a copy of this value to every port in this list."

@bblum
Copy link
Contributor

bblum commented Jun 22, 2013

ok, I'm gonna tag this and its friends as E-easy.

bors added a commit that referenced this issue Aug 1, 2013
The pipes compiler produced data types that encoded efficient and safe
bounded message passing protocols between two endpoints. It was also
capable of producing unbounded protocols.

It was useful research but was arguably done before its proper time.

I am removing it for the following reasons:

* In practice we used it only for producing the `oneshot` protcol  and
  the unbounded `stream` protocol and all communication in Rust use those.
* The interface between the proto! macro and the standard library
  has a large surface area and was difficult to maintain through
  language and library changes.
* It is now written in an old dialect of Rust and generates code
  which would likely be considered non-idiomatic.
* Both the compiler and the runtime are difficult to understand,
  and likewise the relationship between the generated code and
  the library is hard to understand. Debugging is difficult.
* The new scheduler implements `stream` and `oneshot` by hand
  in a way that will be significantly easier to maintain.

This shouldn't be taken as an indication that 'channel protocols'
for Rust are not worth pursuing again in the future.

Concerned parties may include: @graydon, @pcwalton, @eholk, @bblum

The most likely candidates for closing are #7666, #3018, #3020, #7021, #7667, #7303, #3658, #3295.
@thestinger
Copy link
Contributor

Removed by #8170, the bug tracking a rewrite is #7668.

@bblum
Copy link
Contributor

bblum commented Aug 2, 2013

As #3018, not actually relevant to the protocol compiler

@bblum bblum reopened this Aug 2, 2013
@pnkfelix
Copy link
Member

Accepting P-low

@TyOverby
Copy link
Contributor

Should this be closed due to #7668?

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

Is this still open because a broadcast function is still needed in std::comm? I've got a patch almost ready with broadcast and broadcast_opt.

@alexcrichton
Copy link
Member

The initial impetus for these issues has long since become outdated. The std::comm implementation has changed many times in the meantime. @tomjakubowski for now I'm going to close this (and the related two issues) as not being necessary for now. We can continue to consider if these would be necessary for today's channels, but theses issues are dated enough that we're not getting lots of useful information from them any more.

bors added a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
…stable, r=Veykril

Don't suggest unstable items on stable toolchain

Closes rust-lang#3020

This PR implements stability check in `ide-completion` so that unstable items are only suggested if you're on nightly toolchain.

It's a bit unfortunate `CompletionContext::check_stability()` is spammed all over the crate, but we should call it before building `CompletionItem` as you cannot get attributes on the item it's completing from that struct. I looked up every callsite of `Builder::add_to()`, `Completions::add[_opt]()`, and`Completions::add_all()` and inserted the check wherever necessary.

The tests are admittedly incomplete in that I didn't add tests for every kind of item as I thought that would be too big and not worthwhile. I copy-pasted some existing basic tests in every test module and adjusted them.
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: Concurrency related issues. 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

7 participants