Permalink
Browse files
std: Second pass stabilization of sync
This pass performs a second pass of stabilization through the `std::sync`
module, avoiding modules/types that are being handled in other PRs (e.g.
mutexes, rwlocks, condvars, and channels).
The following items are now stable
* `sync::atomic`
* `sync::atomic::ATOMIC_BOOL_INIT` (was `INIT_ATOMIC_BOOL`)
* `sync::atomic::ATOMIC_INT_INIT` (was `INIT_ATOMIC_INT`)
* `sync::atomic::ATOMIC_UINT_INIT` (was `INIT_ATOMIC_UINT`)
* `sync::Once`
* `sync::ONCE_INIT`
* `sync::Once::call_once` (was `doit`)
* C == `pthread_once(..)`
* Boost == `call_once(..)`
* Windows == `InitOnceExecuteOnce`
* `sync::Barrier`
* `sync::Barrier::new`
* `sync::Barrier::wait` (now returns a `bool`)
* `sync::Semaphore::new`
* `sync::Semaphore::acquire`
* `sync::Semaphore::release`
The following items remain unstable
* `sync::SemaphoreGuard`
* `sync::Semaphore::access` - it's unclear how this relates to the poisoning
story of mutexes.
* `sync::TaskPool` - the semantics of a failing task and whether a thread is
re-attached to a thread pool are somewhat unclear, and the
utility of this type in `sync` is question with respect to
the jobs of other primitives. This type will likely become
stable or move out of the standard library over time.
* `sync::Future` - futures as-is have yet to be deeply re-evaluated with the
recent core changes to Rust's synchronization story, and will
likely become stable in the future but are unstable until
that time comes.
[breaking-change]- Loading branch information...
Showing
with
168 additions
and 237 deletions.
- +2 −0 src/doc/guide-tasks.md
- +1 −0 src/doc/guide.md
- +2 −2 src/doc/reference.md
- +1 −1 src/libcollections/vec.rs
- +13 −3 src/libcore/atomic.rs
- +2 −0 src/libcore/cell.rs
- +3 −3 src/libcoretest/atomic.rs
- +1 −1 src/liblog/lib.rs
- +1 −1 src/librustc/middle/infer/region_inference/graphviz.rs
- +1 −1 src/librustc_trans/back/write.rs
- +1 −1 src/librustc_trans/trans/base.rs
- +2 −2 src/libstd/comm/blocking.rs
- +0 −6 src/libstd/io/buffered.rs
- +1 −1 src/libstd/io/stdio.rs
- +1 −1 src/libstd/io/tempfile.rs
- +3 −3 src/libstd/io/test.rs
- +2 −2 src/libstd/os.rs
- +3 −3 src/libstd/rand/os.rs
- +1 −1 src/libstd/rt/backtrace.rs
- +0 −119 src/libstd/rt/exclusive.rs
- +10 −10 src/libstd/rt/unwind.rs
- +1 −1 src/libstd/rt/util.rs
- +5 −3 src/libstd/sync/atomic.rs
- +40 −15 src/libstd/sync/barrier.rs
- +1 −1 src/libstd/sync/condvar.rs
- +5 −2 src/libstd/sync/future.rs
- +1 −1 src/libstd/sync/mod.rs
- +20 −13 src/libstd/sync/once.rs
- +3 −0 src/libstd/sync/semaphore.rs
- +5 −0 src/libstd/sync/task_pool.rs
- +1 −1 src/libstd/sys/common/thread_local.rs
- +1 −1 src/libstd/sys/unix/os.rs
- +3 −7 src/libstd/sys/unix/pipe.rs
- +1 −1 src/libstd/sys/unix/timer.rs
- +1 −1 src/libstd/sys/windows/mod.rs
- +1 −1 src/libstd/sys/windows/mutex.rs
- +1 −1 src/libstd/time/mod.rs
- +1 −1 src/libtime/lib.rs
- +2 −2 src/test/auxiliary/issue-17718.rs
- +5 −5 src/test/bench/shootout-binarytrees.rs
- +4 −4 src/test/bench/shootout-fannkuch-redux.rs
- +3 −3 src/test/compile-fail/std-uncopyable-atomics.rs
- +2 −2 src/test/run-pass/issue-17718.rs
- +10 −10 src/test/run-pass/vector-sort-panic-safe.rs
Oops, something went wrong.