MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_running_loop

Function get_running_loop

crates/stdlib/src/_asyncio.rs:2345–2350  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2343
2344 #[pyfunction]
2345 fn get_running_loop(vm: &VirtualMachine) -> PyResult {
2346 vm.asyncio_running_loop
2347 .borrow()
2348 .clone()
2349 .ok_or_else(|| vm.new_runtime_error("no running event loop"))
2350 }
2351
2352 #[pyfunction]
2353 fn get_event_loop(vm: &VirtualMachine) -> PyResult {

Callers 2

py_initMethod · 0.70
all_tasksFunction · 0.70

Calls 3

ok_or_elseMethod · 0.80
cloneMethod · 0.45
borrowMethod · 0.45

Tested by

no test coverage detected