Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
1 parent
2522ece23f
commit
3a8167b6ad
6 files changed
+127
-81
No files matched your search
@@ -80,6 +80,10 @@ impl<T> AsyncMutex<T> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn force_unlock(&self) {
|
||||
self.lock.drop();
|
||||
}
|
||||
|
||||
pub async fn lock(&self) -> AsyncMutexGuard<'_, T> {
|
||||
self.lock.clone().await;
|
||||
AsyncMutexGuard { mutex: self }
|
||||
|
||||