|
@@ -106,4 +106,12 @@ impl<T> AsyncGlobalContainer<T> {
|
|
|
pub async fn get_mut(&self) -> RwLockWriteGuard<GOption<T>> {
|
|
|
self.content.write().await
|
|
|
}
|
|
|
+
|
|
|
+ pub fn blocking_get(&self) -> RwLockReadGuard<GOption<T>> {
|
|
|
+ self.content.blocking_read()
|
|
|
+ }
|
|
|
+
|
|
|
+ pub fn blocking_get_mut(&self) -> RwLockWriteGuard<GOption<T>> {
|
|
|
+ self.content.blocking_write()
|
|
|
+ }
|
|
|
}
|