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

Function block_on

flow-rs/src/loader/python/utils.rs:18–24  ·  view source on GitHub ↗
(py: Python, task: PyObject)

Source from the content-addressed store, hash-verified

16
17#[pyfunction]
18fn block_on(py: Python, task: PyObject) {
19 py.allow_threads(move || {
20 flow_rs::rt::task::block_on(flow_rs::rt::task::spawn_local(stackful(move || {
21 Python::with_gil(move |py| task.call0(py).unwrap())
22 })));
23 })
24}
25
26#[pyfunction]
27fn yield_now(py: Python) {

Callers 4

decode_videoFunction · 0.85
waitMethod · 0.85
main.pyFile · 0.85
startMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected