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

Method wait

flow-python/src/lib.rs:39–52  ·  view source on GitHub ↗
(&mut self, py: Python)

Source from the content-addressed store, hash-verified

37#[pymethods]
38impl Graph {
39 fn wait(&mut self, py: Python) {
40 self.inps.clear();
41 self.outs.clear();
42 if let Some(graph) = self.graph.take() {
43 graph.stop();
44 }
45 if let Some(handle) = self.handle.take() {
46 py.allow_threads(|| {
47 flow_rs::rt::task::block_on(async {
48 handle.await.unwrap();
49 });
50 });
51 }
52 }
53
54 fn inputs(&self) -> Vec<&str> {
55 self.inps.keys().map(|x| x.as_str()).collect()

Callers 9

megflow_runFunction · 0.45
megflow_quickstartFunction · 0.45
inferenceMethod · 0.45
inferenceMethod · 0.45
inferenceMethod · 0.45
inference_batchMethod · 0.45
inferenceMethod · 0.45
printerFunction · 0.45
main.pyFile · 0.45

Calls 3

block_onFunction · 0.85
takeMethod · 0.80
stopMethod · 0.80

Tested by

no test coverage detected