pub fn wait_for_future<F>(py: Python<'_>, fut: F) -> PyResult<F::Output>
Expand description
Utility to collect rust futures with GIL released and respond to
Python interrupts such as KeyboardInterrupt
. If a signal is
received while the future is running, the future is aborted and the
corresponding Python exception is raised.