Merge remote-tracking branch 'origin/main' into next-dash-interface

[skip ci]
This commit is contained in:
Aleksander
2025-12-23 17:01:16 +01:00
parent 848674c143
commit 9a606dbce5
63 changed files with 2457 additions and 309 deletions
+25
View File
@@ -0,0 +1,25 @@
use std::sync::Arc;
use tokio::sync::Notify;
// Copyable wrapped Notify struct for easier usage
#[derive(Default, Clone)]
pub struct Notifier {
notifier: Arc<Notify>,
}
impl Notifier {
pub fn new() -> Self {
Self {
notifier: Arc::new(Notify::new()),
}
}
pub fn notify(&self) {
self.notifier.notify_waiters();
}
pub async fn wait(&self) {
self.notifier.notified().await;
}
}