MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / wait

Method wait

flow-rs/src/debug/feature.rs:45–62  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

43 }
44 #[allow(dead_code)]
45 pub async fn wait(&self) {
46 let mut listener = None;
47
48 loop {
49 if self.enable.load(Ordering::Relaxed) {
50 return;
51 }
52
53 match listener.take() {
54 None => {
55 listener = Some(self.lock_ops.listen());
56 }
57 Some(l) => {
58 l.await;
59 }
60 }
61 }
62 }
63}
64
65pub struct FeatureCommand {

Callers 1

execMethod · 0.45

Calls 3

loadMethod · 0.80
takeMethod · 0.80
listenMethod · 0.80

Tested by 1

execMethod · 0.36