(&self)
| 1502 | pub fn new_latch(&self) -> Latch { |
| 1503 | Latch::new(self.semaphore()) |
| 1504 | } |
| 1505 | |
| 1506 | /// Runs jobs until the provided latch is set. |
| 1507 | /// |
| 1508 | /// The thread may go to sleep if it runs out of work to do, but will wake |
| 1509 | /// when the latch is set or more work becomes available. |