pub struct L2Sync<T> {
data: SyncUnsafeCell<T>,
}
Expand description
All L2Sync objects are guaranteed to be synchronized on the epilogue level.
Fields§
§data: SyncUnsafeCell<T>
Implementations§
Source§impl<T> L2Sync<T>
impl<T> L2Sync<T>
pub const fn new(data: T) -> Self
pub fn lock(&self) -> L2Guard<'_, T>
Sourcepub unsafe fn get_ref_unguarded(&self) -> &T
pub unsafe fn get_ref_unguarded(&self) -> &T
This breaks synchronization, the caller is responsible of checking the global L2_AVAILABLE flag, and do other stuffs (like relaying) when epilogue level is occupied.