gothack_future_parking_lot/lib.rs
1// Copyright 2018 Marco Napetti
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#![deny(warnings)]
8#![deny(missing_docs)]
9
10//! # future-parking_lot
11//!
12//! A simple Future implementation for parking_lot
13
14/// parking_lot::Mutex Future implementation
15pub mod mutex;
16/// parking_lot::RwLock Future implementation
17pub mod rwlock;
18
19//Re-export `parking_lot` to avoid version mismatch
20pub use parking_lot;
21
22pub(crate) fn map_atomic_bool_compare_exchange_result(result: Result<bool, bool>) -> bool {
23 match result {
24 Ok(value) => value,
25 Err(value) => value,
26 }
27}