MCPcopy Index your code
hub / github.com/SSheldon/rust-dispatch / access_timeout

Method access_timeout

src/sem.rs:67–71  ·  view source on GitHub ↗

Wait until the specified timeout to access a resource protected by self. This decrements self and returns a guard that increments when dropped.

(&self, timeout: Duration)

Source from the content-addressed store, hash-verified

65 /// Wait until the specified timeout to access a resource protected by self.
66 /// This decrements self and returns a guard that increments when dropped.
67 pub fn access_timeout(&self, timeout: Duration)
68 -> Result<SemaphoreGuard, WaitTimeout> {
69 self.wait_timeout(timeout)?;
70 Ok(SemaphoreGuard::new(self.clone()))
71 }
72}
73
74unsafe impl Sync for Semaphore {}

Callers

nothing calls this directly

Calls 2

wait_timeoutMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected