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

Function get_current_tasks_dict

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

Source from the content-addressed store, hash-verified

2322 }
2323
2324 fn get_current_tasks_dict(vm: &VirtualMachine) -> PyResult<PyObjectRef> {
2325 // Use the module-level _current_tasks Dict
2326 let asyncio_module = vm.import("_asyncio", 0)?;
2327 vm.get_attribute_opt(asyncio_module, vm.ctx.intern_str("_current_tasks"))?
2328 .ok_or_else(|| vm.new_attribute_error("_current_tasks not found"))
2329 }
2330
2331 #[pyfunction]
2332 fn _get_running_loop(vm: &VirtualMachine) -> PyObjectRef {

Callers 5

current_taskFunction · 0.85
_enter_taskFunction · 0.85
_leave_taskFunction · 0.85
_swap_current_taskFunction · 0.85
_on_forkFunction · 0.85

Calls 4

ok_or_elseMethod · 0.80
get_attribute_optMethod · 0.80
intern_strMethod · 0.80
importMethod · 0.45

Tested by

no test coverage detected