Skip to main content

qubit_lock/monitor/
notification_waiter.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 *    SPDX-License-Identifier: Apache-2.0
6 *
7 *    Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! Blocking notification-wait capability.
11
12/// Waits until a notification is observed.
13///
14/// This trait models a blocking, memoryless notification wait. A notification
15/// sent before `wait` starts is not remembered for future waiters.
16pub trait NotificationWaiter {
17    /// Blocks the current thread until a notification wakes this waiter.
18    fn wait(&self);
19}