(&self, value: Py<PyAny>)
| 43 | } |
| 44 | |
| 45 | pub(crate) fn complete(&self, value: Py<PyAny>) { |
| 46 | let (mutex, condvar) = &*self.inner; |
| 47 | let mut state = mutex.lock().unwrap(); |
| 48 | if state.is_terminal() { |
| 49 | return; |
| 50 | } |
| 51 | *state = CallableState::Completed(value); |
| 52 | condvar.notify_all(); |
| 53 | } |
| 54 | |
| 55 | pub(crate) fn fail(&self, message: String) { |
| 56 | let (mutex, condvar) = &*self.inner; |