thin-cell 0.2.1

A compact, single-threaded smart pointer combining reference counting and interior mutability
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Multithreaded version of `ThinCell`

mod state;
use state::*;

crate::thin_cell! {
    /// A compact (`1-usize`), multi-threaded smart pointer combining `Arc`
    /// and `Mutex`.
}

unsafe impl<T: ?Sized + Send + Sync> Send for ThinCell<T> {}
unsafe impl<T: ?Sized + Send + Sync> Sync for ThinCell<T> {}

#[cfg(feature = "weak")]
unsafe impl<T: ?Sized + Send + Sync> Send for Weak<T> {}
#[cfg(feature = "weak")]
unsafe impl<T: ?Sized + Send + Sync> Sync for Weak<T> {}