summaryrefslogtreecommitdiffstats
path: root/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs
new file mode 100644
index 0000000..d792b91
--- /dev/null
+++ b/src/util.rs
@@ -0,0 +1,5 @@
+pub type Mutex<T> = async_std::sync::Arc<async_std::sync::Mutex<T>>;
+
+pub fn mutex<T>(t: T) -> Mutex<T> {
+ async_std::sync::Arc::new(async_std::sync::Mutex::new(t))
+}