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

Method access

src/sem.rs:60–63  ·  view source on GitHub ↗

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

(&self)

Source from the content-addressed store, hash-verified

58 /// Wait to access a resource protected by self.
59 /// This decrements self and returns a guard that increments when dropped.
60 pub fn access(&self) -> SemaphoreGuard {
61 self.wait();
62 SemaphoreGuard::new(self.clone())
63 }
64
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.

Callers 1

test_semaphore_guardFunction · 0.80

Calls 2

waitMethod · 0.45
cloneMethod · 0.45

Tested by 1

test_semaphore_guardFunction · 0.64