Wait for (decrement) self.
(&self)
| 26 | |
| 27 | /// Wait for (decrement) self. |
| 28 | pub fn wait(&self) { |
| 29 | let result = unsafe { |
| 30 | dispatch_semaphore_wait(self.ptr, DISPATCH_TIME_FOREVER) |
| 31 | }; |
| 32 | assert!(result == 0, "Dispatch semaphore wait errored"); |
| 33 | } |
| 34 | |
| 35 | /// Wait for (decrement) self until the specified timeout has elapsed. |
| 36 | pub fn wait_timeout(&self, timeout: Duration) -> Result<(), WaitTimeout> { |
no outgoing calls