use crate::sleep::internal::notification_latch::NotificationLatch;
pub struct LoomNotificationLatch {
inner: NotificationLatch,
}
impl LoomNotificationLatch {
#[must_use]
#[inline]
pub fn new() -> Self {
Self {
inner: NotificationLatch::new(),
}
}
#[inline(always)]
pub fn clear_notification(&self) {
self.inner.clear_notification();
}
#[inline(always)]
pub fn notify(&self) {
self.inner.notify();
}
#[must_use]
#[inline(always)]
pub fn take_notification(&self) -> bool {
self.inner.take_notification()
}
}