]> git.proxmox.com Git - rustc.git/blame - src/libstd/sync/mod.rs
Imported Upstream version 1.0.0~beta.3
[rustc.git] / src / libstd / sync / mod.rs
CommitLineData
1a4d82fc
JJ
1// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11//! Useful synchronization primitives
12//!
13//! This module contains useful safe and unsafe synchronization primitives.
14//! Most of the primitives in this module do not provide any sort of locking
15//! and/or blocking at all, but rather provide the necessary tools to build
16//! other types of concurrent primitives.
17
85aaf69f 18#![stable(feature = "rust1", since = "1.0.0")]
1a4d82fc
JJ
19
20pub use alloc::arc::{Arc, Weak};
21pub use core::atomic;
22
9346a6ac 23pub use self::barrier::{Barrier, BarrierWaitResult};
1a4d82fc 24pub use self::condvar::{Condvar, StaticCondvar, CONDVAR_INIT};
9346a6ac
AL
25pub use self::mutex::MUTEX_INIT;
26pub use self::mutex::{Mutex, MutexGuard, StaticMutex};
1a4d82fc 27pub use self::once::{Once, ONCE_INIT};
9346a6ac
AL
28pub use sys_common::poison::{PoisonError, TryLockError, TryLockResult, LockResult};
29pub use self::rwlock::{RwLockReadGuard, RwLockWriteGuard};
30pub use self::rwlock::{RwLock, StaticRwLock, RW_LOCK_INIT};
1a4d82fc 31pub use self::semaphore::{Semaphore, SemaphoreGuard};
1a4d82fc
JJ
32
33pub use self::future::Future;
1a4d82fc
JJ
34
35pub mod mpsc;
36
37mod barrier;
38mod condvar;
39mod future;
40mod mutex;
41mod once;
1a4d82fc
JJ
42mod rwlock;
43mod semaphore;