sync-arena 0.2.0

A simple, thread-safe arena allocator.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::ops::Deref;

pub(crate) type Mutex<T> = remutex::ReentrantMutex<T>;

impl<'s, T: 's> super::Reentrant<'s, T> for Mutex<T> {
    fn create(data: T) -> Self {
        Mutex::new(data)
    }
    fn reentrant_lock(&'s self) -> impl Deref<Target = T> + 's {
        self.lock().unwrap()
    }
}