read

Function read 

Source
pub(crate) fn read<F, T>(mu: &Mutex<Connection>, f: F) -> Result<T>
where F: FnOnce(&Connection) -> Result<T>,
Expand description

Lock + read. Closure receives a borrowed Connection; lock is held for the closure’s duration.