(
py: Python<'py>,
value: &Bound<'py, PyAny>,
)
| 84 | } |
| 85 | |
| 86 | pub fn ready_future<'py>( |
| 87 | py: Python<'py>, |
| 88 | value: &Bound<'py, PyAny>, |
| 89 | ) -> PyResult<Bound<'py, PyAny>> { |
| 90 | let future = py |
| 91 | .import("asyncio")? |
| 92 | .call_method0("get_running_loop")? |
| 93 | .call_method0("create_future")?; |
| 94 | future.call_method1("set_result", (value,))?; |
| 95 | Ok(future) |
| 96 | } |
| 97 | |
| 98 | pub fn run_sync<T, E, F>( |
| 99 | py: Python<'_>, |
no test coverage detected