rust/library/std/src
Michael Goulet 4a01a38466
Rollup merge of #111087 - ibraheemdev:patch-15, r=dtolnay
Implement `Sync` for `mpsc::Sender`

`mpsc::Sender` is currently `!Sync` because the previous implementation contained an optimization where the channel started out as single-producer and was dynamically upgraded on the first clone, which relied on a unique reference to the sender. This optimization is one of the main reasons the old implementation was so complex and was removed in #93563. `mpsc::Sender` can now soundly implement `Sync`.

Note for any potential confusion, this chance does *not* add MPMC behavior. This only affects the already `Send + Clone` *sender*, not *receiver*.

It's technically possible to rely on the `!Sync` behavior in the same way as a `PhantomData<*mut T>`, but that seems very unlikely in practice. Either way, this change is insta-stable and needs an FCP.

`@rustbot` label +T-libs-api -T-libs
2023-06-23 19:47:19 -07:00
..
backtrace
collections Auto merge of #104455 - the8472:dont-drain-on-drop, r=Amanieu 2023-06-15 00:03:10 +00:00
env
error
f32
f64
ffi Rollup merge of #98202 - aticu:impl_tryfrom_osstr_for_str, r=Amanieu 2023-06-14 18:10:27 +02:00
fs Update tvOS support elsewhere in the stdlib 2023-06-21 14:59:40 -07:00
io Rollup merge of #107200 - mina86:c, r=Amanieu 2023-06-18 08:06:41 +02:00
net Rollup merge of #112464 - eval-exec:exec/fix-connect_timeout-overflow, r=ChrisDenton 2023-06-20 14:23:39 +02:00
num
os Update tvOS support elsewhere in the stdlib 2023-06-21 14:59:40 -07:00
panic
path
personality wip: Support Apple tvOS in libstd 2023-06-21 14:59:37 -07:00
prelude
process
sync implement Sync for mpsc::Sender 2023-06-10 19:22:07 -04:00
sys Actually save all the files 2023-06-21 14:59:40 -07:00
sys_common wip: Support Apple tvOS in libstd 2023-06-21 14:59:37 -07:00
thread Update tvOS support elsewhere in the stdlib 2023-06-21 14:59:40 -07:00
time
alloc.rs
ascii.rs
backtrace.rs
env.rs
error.rs
f32.rs abs_sub: fix typo 0[-:][+.]0 2023-06-10 10:45:50 -05:00
f64.rs abs_sub: fix typo 0[-:][+.]0 2023-06-10 10:45:50 -05:00
fs.rs
keyword_docs.rs
lib.rs reorder attributes to make miri-test-libstd work again 2023-06-11 22:15:46 +02:00
macros.rs Fix typo in eprintln docs 2023-06-21 01:08:10 +01:00
num.rs
panic.rs
panicking.rs
path.rs
personality.rs fix: get the l4re target working again 2023-06-13 20:41:33 +00:00
primitive_docs.rs Extend unused_must_use to cover block exprs 2023-06-15 17:59:13 +08:00
process.rs
rt.rs
time.rs