(&self)
| 39 | } |
| 40 | |
| 41 | fn lock_pending(&self) -> MutexGuard<'_, HashMap<RequestId, mpsc::Sender<Response>>> { |
| 42 | match self.pending.lock() { |
| 43 | Ok(guard) => guard, |
| 44 | Err(poisoned) => poisoned.into_inner(), |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | /// Register a pending request. Returns a bounded receiver the session awaits. |
| 49 | /// |