Struct fuse_backend_rs::common::mpmc::Channel
source · pub struct Channel<T> { /* private fields */ }Expand description
An asynchronous multi-producer multi-consumer channel based on tokio::sync::Notify.
Implementations§
source§impl<T> Channel<T>
impl<T> Channel<T>
sourcepub fn send(&self, msg: T) -> Result<(), T>
pub fn send(&self, msg: T) -> Result<(), T>
Send a message to the channel.
The message object will be returned on error, to ease the lifecycle management.
sourcepub fn flush_pending_prefetch_requests<F>(&self, f: F)where
F: FnMut(&T) -> bool,
pub fn flush_pending_prefetch_requests<F>(&self, f: F)where
F: FnMut(&T) -> bool,
Flush all pending requests specified by the predicator.
sourcepub fn lock_channel(&self) -> MutexGuard<'_, VecDeque<T>>
pub fn lock_channel(&self) -> MutexGuard<'_, VecDeque<T>>
Lock the channel to block all queue operations.
sourcepub fn notify_waiters(&self)
pub fn notify_waiters(&self)
Notify all waiters.