(&self, wait: Duration)
| 129 | } |
| 130 | |
| 131 | pub fn wait_timeout(&self, wait: Duration) -> Option<T> { |
| 132 | match self.result.recv_timeout(wait) { |
| 133 | Ok(value) => Some(value.unwrap()), |
| 134 | Err(RecvTimeoutError::Timeout) => None, |
| 135 | Err(e) => panic!("{:?}", e), |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | pub fn wait(self) -> T { |
| 140 | match self.result.recv() { |