]> git.lizzy.rs Git - rust.git/commit
std: Second pass stabilization of sync
authorAlex Crichton <alex@alexcrichton.com>
Mon, 29 Dec 2014 23:03:01 +0000 (15:03 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 2 Jan 2015 06:02:59 +0000 (22:02 -0800)
commitf3a7ec7028c76b3a1c6051131328f372b068e33a
treedce13e4152a6d9d988042c4be77720d14dcc62c0
parentcd614164e692cca3a1460737f581fcb6d4630baf
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]
44 files changed:
src/doc/guide-tasks.md
src/doc/guide.md
src/doc/reference.md
src/libcollections/vec.rs
src/libcore/atomic.rs
src/libcore/cell.rs
src/libcoretest/atomic.rs
src/liblog/lib.rs
src/librustc/middle/infer/region_inference/graphviz.rs
src/librustc_trans/back/write.rs
src/librustc_trans/trans/base.rs
src/libstd/comm/blocking.rs
src/libstd/io/buffered.rs
src/libstd/io/stdio.rs
src/libstd/io/tempfile.rs
src/libstd/io/test.rs
src/libstd/os.rs
src/libstd/rand/os.rs
src/libstd/rt/backtrace.rs
src/libstd/rt/exclusive.rs [deleted file]
src/libstd/rt/unwind.rs
src/libstd/rt/util.rs
src/libstd/sync/atomic.rs
src/libstd/sync/barrier.rs
src/libstd/sync/condvar.rs
src/libstd/sync/future.rs
src/libstd/sync/mod.rs
src/libstd/sync/once.rs
src/libstd/sync/semaphore.rs
src/libstd/sync/task_pool.rs
src/libstd/sys/common/thread_local.rs
src/libstd/sys/unix/os.rs
src/libstd/sys/unix/pipe.rs
src/libstd/sys/unix/timer.rs
src/libstd/sys/windows/mod.rs
src/libstd/sys/windows/mutex.rs
src/libstd/time/mod.rs
src/libtime/lib.rs
src/test/auxiliary/issue-17718.rs
src/test/bench/shootout-binarytrees.rs
src/test/bench/shootout-fannkuch-redux.rs
src/test/compile-fail/std-uncopyable-atomics.rs
src/test/run-pass/issue-17718.rs
src/test/run-pass/vector-sort-panic-safe.rs