pub struct SharedPollingSignals { /* private fields */ }Expand description
A filesystem path based way to poll for ‘signals’. When receiving a signal, it has to be confirmed explicitly, and the confirmation is shared amongst all readers (usable for “work was done” on a ‘versioned’ input; the work confirmed refers to the version of the signal that was read; the confirmation with the highest signal value is stored). Note that multiple readers might start doing the same work at the same time. Cloning shares the same receiver and sender.
Implementations§
pub fn open( channel_path: &Path, done_path: &Path, initial_value: u64, ) -> Result<Self, IPCAtomicError>
Sourcepub fn get_latest_signal(&self) -> Option<Signal<'_>>
pub fn get_latest_signal(&self) -> Option<Signal<'_>>
If there were signals, returns a representation of the last
one. confirm or ignore must be called on it when the
action warranted by the signal has been carried out, dropping
it will panic!
pub fn sender(&self) -> PollingSignalsSender
Trait Implementations§
Source§fn clone(&self) -> SharedPollingSignals
fn clone(&self) -> SharedPollingSignals
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more