swap_buffer_queue/notify.rs
1//! Tool for (a)synchronous implementation.
2
3/// Notifier for waiting [`Queue`](crate::Queue) operations.
4pub trait Notify {
5 /// Wake waiting dequeue operation.
6 fn notify_dequeue(&self);
7 /// Wake waiting enqueue operation.
8 fn notify_enqueue(&self);
9}
10
11impl Notify for () {
12 #[inline]
13 fn notify_dequeue(&self) {}
14 #[inline]
15 fn notify_enqueue(&self) {}
16}