usecore::sync::atomic;use windows_sys;pub(super)structBarrierImpl;implcrate::Barrier forBarrierImpl{/// Issues light memory barrier for fast path.
////// It issues compiler fence, which disallows compiler optimizations across itself.
#[inline(always)]fnlight(){atomic::compiler_fence(atomic::Ordering::SeqCst);}/// Issues heavy memory barrier for slow path.
////// It invokes the `FlushProcessWriteBuffers()` system call.
#[inline]fnheavy(){unsafe{windows_sys::Win32::System::Threading::FlushProcessWriteBuffers();}}}