pub(crate) struct SyncFacility {
pub(crate) notifies: Mutex<HashMap<SyncPoint, Arc<Notify>>>,
pub(crate) actions: Mutex<HashMap<SyncPoint, Arc<dyn Fn() -> BoxFuture<'static, ()> + Send + Sync>>>,
}Fields§
§notifies: Mutex<HashMap<SyncPoint, Arc<Notify>>>Notify for each sync point.
actions: Mutex<HashMap<SyncPoint, Arc<dyn Fn() -> BoxFuture<'static, ()> + Send + Sync>>>Actions for each sync point.
Implementations§
Source§impl SyncFacility
impl SyncFacility
pub(crate) fn new() -> Self
pub(crate) fn get() -> &'static Self
pub(crate) async fn wait( &self, sync_point: SyncPoint, timeout: Duration, relay: bool, ) -> Result<(), Error>
pub(crate) fn emit(&self, sync_point: SyncPoint)
pub(crate) fn hook( &self, sync_point: SyncPoint, action: Arc<dyn Fn() -> BoxFuture<'static, ()> + Send + Sync>, )
pub(crate) fn reset(&self)
pub(crate) fn remove_action(&self, sync_point: SyncPoint)
pub(crate) async fn on(&self, sync_point: SyncPoint)
Auto Trait Implementations§
impl !Freeze for SyncFacility
impl !RefUnwindSafe for SyncFacility
impl !UnwindSafe for SyncFacility
impl Send for SyncFacility
impl Sync for SyncFacility
impl Unpin for SyncFacility
impl UnsafeUnpin for SyncFacility
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