Returns whether all workers have pressed their buttons.
(&mut self)
| 763 | |
| 764 | /// Returns whether all workers have pressed their buttons. |
| 765 | pub fn all_pressed(&mut self) -> bool { |
| 766 | while self.puller.recv().is_some() { |
| 767 | self.buttons_remaining -= 1; |
| 768 | } |
| 769 | self.buttons_remaining == 0 |
| 770 | } |
| 771 | } |
| 772 | |
| 773 | pub struct Button { |
no test coverage detected