]> git.proxmox.com Git - rustc.git/blob - vendor/parking_lot/src/lib.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / vendor / parking_lot / src / lib.rs
1 // Copyright 2016 Amanieu d'Antras
2 //
3 // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4 // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5 // http://opensource.org/licenses/MIT>, at your option. This file may not be
6 // copied, modified, or distributed except according to those terms.
7
8 //! This library provides implementations of `Mutex`, `RwLock`, `Condvar` and
9 //! `Once` that are smaller, faster and more flexible than those in the Rust
10 //! standard library. It also provides a `ReentrantMutex` type.
11
12 #![warn(missing_docs)]
13 #![warn(rust_2018_idioms)]
14 #![cfg_attr(feature = "nightly", feature(llvm_asm))]
15
16 mod condvar;
17 mod elision;
18 mod fair_mutex;
19 mod mutex;
20 mod once;
21 mod raw_fair_mutex;
22 mod raw_mutex;
23 mod raw_rwlock;
24 mod remutex;
25 mod rwlock;
26 mod util;
27
28 #[cfg(feature = "deadlock_detection")]
29 pub mod deadlock;
30 #[cfg(not(feature = "deadlock_detection"))]
31 mod deadlock;
32
33 pub use self::condvar::{Condvar, WaitTimeoutResult};
34 pub use self::fair_mutex::{const_fair_mutex, FairMutex, FairMutexGuard, MappedFairMutexGuard};
35 pub use self::mutex::{const_mutex, MappedMutexGuard, Mutex, MutexGuard};
36 pub use self::once::{Once, OnceState};
37 pub use self::raw_fair_mutex::RawFairMutex;
38 pub use self::raw_mutex::RawMutex;
39 pub use self::raw_rwlock::RawRwLock;
40 pub use self::remutex::{
41 const_reentrant_mutex, MappedReentrantMutexGuard, RawThreadId, ReentrantMutex,
42 ReentrantMutexGuard,
43 };
44 pub use self::rwlock::{
45 const_rwlock, MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard,
46 RwLockUpgradableReadGuard, RwLockWriteGuard,
47 };
48 pub use ::lock_api;