about summary refs log tree commit diff
path: root/library/std/src/sync/mpsc
AgeCommit message (Collapse)AuthorLines
2022-01-03Make `Receiver::into_iter` into a clickable linkzohnannor-1/+2
The documentation on `std::sync::mpsc::Iter` and `std::sync::mpsc::TryIter` provides links to the corresponding `Receiver` methods, unlike `std::sync::mpsc::IntoIter` does. This was left out in c59b188aaeadea32625534250d1f5120420be000 Related to #29377
2021-10-30Add #[must_use] to remaining std functions (O-Z)John Kugelman-0/+2
2021-10-26Remove redundant AlignerTony Yang-5/+2
The `Aligner` struct seems to be unnecessary. Previously noted by @arthurprs https://github.com/rust-lang/rust/pull/44963#discussion_r145340754 Reddit discussion: https://www.reddit.com/r/rust/comments/pfvvz2/aligner_and_cachealigned/ Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=fa7ca554922755f9d1b62b017d785c6f
2021-09-22Update library/std/src/sync/mpsc/shared.rsMara Bos-1/+1
2021-09-05rust fmtlovasoa-1/+5
2021-09-03Add a better error message for #39364Ophir LOJKINE-1/+1
There is a known bug in the implementation of mpsc channels in rust. This adds a clearer error message when the bug occurs, so that developers don't lose too much time looking for the origin of the bug. See https://github.com/rust-lang/rust/issues/39364
2021-07-29Fix may not to appropriate might not or must notAli Malik-3/+3
2021-06-23Use HTTPS links where possibleSmitty-3/+3
2021-06-15Rollup merge of #80269 - pickfire:patch-4, r=joshtriplettYuki Okushi-7/+46
Explain non-dropped sender recv in docs Original senders that are still hanging around could cause Receiver::recv to not block since this is a potential footgun for beginners, clarify more on this in the docs for readers to be aware about it. Maybe it would be better to show an example of the pattern where `drop(tx)` is used when it is being cloned multiple times? Although I have seen it in quite a few articles but I am surprised that this part is not very clear with the current words without careful reading. > If the corresponding Sender has disconnected, or it disconnects while this call is blocking, this call will wake up and return Err to indicate that no more messages can ever be received on this channel. However, since channels are buffered, messages sent before the disconnect will still be properly received. Some words there may seemed similar if I carefully read and relate it but if I am new, I probably does not know "drop" makes it "disconnected". So I mention the words "drop" and "alive" to make it more relatable to lifetime.
2021-06-12Explain non-dropped sender recv in docsIvan Tham-7/+46
Original senders that are still hanging around could cause Receiver::recv to not block since this is a potential footgun for beginners, clarify more on this in the docs for readers to be aware about it. Fix minor tidbits in sender recv doc Co-authored-by: Dylan DPC <dylan.dpc@gmail.com> Add example for unbounded receive loops in doc Show the drop(tx) pattern, based on tokio docs https://tokio-rs.github.io/tokio/doc/tokio/sync/index.html Fix example code for drop sender recv Fix wording in sender docs Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-04-21Replace all `fmt.pad` with `debug_struct`Christiaan Dirkx-1/+1
2021-03-27Use DebugStruct::finish_non_exhaustive() in std.Mara Bos-3/+3
2021-03-01Add diagnostic itemsCameron Steffen-0/+1
2020-12-22Migrate standard library away from compare_and_swapLinus Färnstrand-9/+31
2020-11-07Convert a bunch of intra-doc linksCamelid-3/+0
2020-09-21Applied review commentsErik Hofmayer-0/+6
2020-09-20Documented From impls in std/sync/mpsc/mod.rsErik Hofmayer-0/+9
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-1517/+1513
Also doing fmt inplace as requested.
2020-08-22Use intra-doc-links in `std::sync::*`LeSeulArtichaut-86/+22
2020-07-27mv std libs to library/mark-0/+5386