(state: &Mutex<BusState>)
| 180 | } |
| 181 | |
| 182 | fn lock_bus(state: &Mutex<BusState>) -> std::sync::MutexGuard<'_, BusState> { |
| 183 | match state.lock() { |
| 184 | Ok(g) => g, |
| 185 | Err(p) => { |
| 186 | error!(target: "shutdown", "ShutdownBus mutex poisoned — recovering"); |
| 187 | p.into_inner() |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | impl ShutdownBus { |
| 193 | /// Create a new `ShutdownBus`. Returns the bus (for registering tasks |
no test coverage detected