Macro lock_order::lock [−][src]
lock!() { /* proc-macro */ }
Expand description
Lock one or more locks at a time.
This takes multiple lock arguments (with an optional mut
flag) and creates a single let
expression binding the .lock().unwrap()
into variables of the same name as the last identifier
in the lock expression. This means that if something is passed such as:
lock!(mut self.locks.connections);
Then the output will be something similar to:
let (mut connection) = (self.locks.connections.lock().unwrap());