macro_rules! with_handler_lock {
($self:expr, $handler_impl:expr) => { ... };
}
Expand description
Macro to wrap handler functions with a global lock
This macro takes a handler function call and wraps it with the handler lock acquisition. It’s useful for ensuring exclusive access to all leaves during handler operations.
§Usage
// Inside an SDK method
with_handler_lock!(self, async {
// Your handler implementation here
self.some_internal_method().await?;
Ok(result)
}).await