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

Function create_future

flow-rs/src/loader/python/utils.rs:84–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82
83#[pyfunction]
84fn create_future() -> (PyFuture, PyWaker) {
85 let (s, r) = oneshot::channel();
86 (PyFuture { chan: Some(r) }, PyWaker { chan: Some(s) })
87}
88
89pub fn utils_register(module: &PyModule) -> PyResult<()> {
90 module.add_function(wrap_pyfunction!(yield_now, module)?)?;

Callers 1

printerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected