(vm: &VirtualMachine)
| 2558 | /// Reset task state after fork in child process. |
| 2559 | #[pyfunction] |
| 2560 | fn _on_fork(vm: &VirtualMachine) -> PyResult<()> { |
| 2561 | // Clear current_tasks dict so child process doesn't inherit parent's tasks |
| 2562 | if let Ok(current_tasks) = get_current_tasks_dict(vm) { |
| 2563 | vm.call_method(¤t_tasks, "clear", ())?; |
| 2564 | } |
| 2565 | // Clear the running loop and task |
| 2566 | *vm.asyncio_running_loop.borrow_mut() = None; |
| 2567 | *vm.asyncio_running_task.borrow_mut() = None; |
| 2568 | Ok(()) |
| 2569 | } |
| 2570 | |
| 2571 | #[pyfunction] |
| 2572 | fn future_add_to_awaited_by( |
nothing calls this directly
no test coverage detected