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

Method get_stack

crates/stdlib/src/_asyncio.rs:1623–1630  ·  view source on GitHub ↗
(zelf: PyRef<Self>, args: GetStackArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1621
1622 #[pymethod]
1623 fn get_stack(zelf: PyRef<Self>, args: GetStackArgs, vm: &VirtualMachine) -> PyResult {
1624 let limit = args.limit.flatten().unwrap_or_else(|| vm.ctx.none());
1625 // vm.import returns the top-level module, get base_tasks submodule
1626 let asyncio = vm.import("asyncio.base_tasks", 0)?;
1627 let base_tasks = asyncio.get_attr(vm.ctx.intern_str("base_tasks"), vm)?;
1628 let get_stack_func = base_tasks.get_attr(vm.ctx.intern_str("_task_get_stack"), vm)?;
1629 get_stack_func.call((zelf, limit), vm)
1630 }
1631
1632 #[pymethod]
1633 fn print_stack(

Callers

nothing calls this directly

Calls 6

noneMethod · 0.80
intern_strMethod · 0.80
flattenMethod · 0.45
importMethod · 0.45
get_attrMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected