(&self, message: String)
| 53 | } |
| 54 | |
| 55 | pub(crate) fn fail(&self, message: String) { |
| 56 | let (mutex, condvar) = &*self.inner; |
| 57 | let mut state = mutex.lock().unwrap(); |
| 58 | if state.is_terminal() { |
| 59 | return; |
| 60 | } |
| 61 | *state = CallableState::Failed(message); |
| 62 | condvar.notify_all(); |
| 63 | } |
| 64 | |
| 65 | pub(crate) fn cancel(&self) -> bool { |
| 66 | let (mutex, condvar) = &*self.inner; |