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

Method wait

flow-rs/src/loader/python/utils.rs:61–67  ·  view source on GitHub ↗
(&mut self, py: Python)

Source from the content-addressed store, hash-verified

59#[pymethods]
60impl PyFuture {
61 fn wait(&mut self, py: Python) -> PyObject {
62 if let Some(chan) = std::mem::take(&mut self.chan) {
63 with_context(py, || wait(chan)).unwrap()
64 } else {
65 py.None()
66 }
67 }
68
69 fn cancel(&mut self) {
70 self.chan = None;

Callers

nothing calls this directly

Calls 1

with_contextFunction · 0.85

Tested by

no test coverage detected