MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / wait

Method wait

vmm/src/sync_utils.rs:30–35  ·  view source on GitHub ↗

Wait at the gate. Only blocks if the gate is not opened.

(&self)

Source from the content-addressed store, hash-verified

28
29 /// Wait at the gate. Only blocks if the gate is not opened.
30 pub fn wait(&self) {
31 let mut open = self.open.lock().unwrap();
32 while !*open {
33 open = self.cv.wait(open).unwrap();
34 }
35 }
36
37 /// Open the gate, releasing all waiting threads.
38 pub fn open(&self) {

Calls

no outgoing calls