(&mut self)
| 159 | |
| 160 | impl<T: Timestamp, D: Container, C: InputConnection<T>> AsyncInputHandle<T, D, C> { |
| 161 | pub fn next_sync(&mut self) -> Option<Event<T, C::Capability, D>> { |
| 162 | let mut queue = self.queue.borrow_mut(); |
| 163 | match queue.pop_front()? { |
| 164 | Event::Data(cap, data) => Some(Event::Data(cap, data)), |
| 165 | Event::Progress(frontier) => { |
| 166 | self.done = frontier.is_empty(); |
| 167 | Some(Event::Progress(frontier)) |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | /// Waits for the handle to have data. After this function returns it is guaranteed that at |
| 173 | /// least one call to `next_sync` will be `Some(_)`. |
no test coverage detected