MCPcopy Create free account
hub / github.com/SSheldon/rust-dispatch / wait

Method wait

src/sem.rs:28–33  ·  view source on GitHub ↗

Wait for (decrement) self.

(&self)

Source from the content-addressed store, hash-verified

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> {

Callers 2

accessMethod · 0.45
test_semaphoreFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_semaphoreFunction · 0.36