Party mode

This commit is contained in:
2023-12-03 17:52:38 +01:00
parent f7ec98f8e3
commit d001ce4567
12 changed files with 697 additions and 393 deletions

15
backend/src/util.rs Normal file
View File

@ -0,0 +1,15 @@
use tokio::task::AbortHandle;
pub struct DeadMansHandle(pub AbortHandle);
impl From<AbortHandle> for DeadMansHandle {
fn from(abort: AbortHandle) -> Self {
DeadMansHandle(abort)
}
}
impl Drop for DeadMansHandle {
fn drop(&mut self) {
self.0.abort();
}
}