qubit_lock/monitor/async_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//! Asynchronous notification-wait capability.
11
12use crate::monitor::AsyncMonitorFuture;
13
14/// Waits asynchronously until a notification is observed.
15pub trait AsyncNotificationWaiter {
16 /// Returns a future that resolves after a notification wakes this waiter.
17 fn async_wait<'a>(&'a self) -> AsyncMonitorFuture<'a, ()>;
18}