with_lock

Function with_lock 

Source
pub async fn with_lock<F, Fut>(lock_name: &str, f: F) -> Result<(), JsValue>
where F: FnOnce() -> Fut + 'static, Fut: Future<Output = Result<(), JsValue>> + 'static,
Expand description

Request a Web Lock and execute work