MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / run_future

Function run_future

crates/pyhq/src/utils/mod.rs:23–27  ·  view source on GitHub ↗

Run the provided future to completion using a global Tokio runtime managed by `pyo3_async_runtimes`.

(future: F)

Source from the content-addressed store, hash-verified

21
22/// Run the provided future to completion using a global Tokio runtime managed by `pyo3_async_runtimes`.
23pub(crate) fn run_future<F: Future>(future: F) -> F::Output {
24 let runtime = pyo3_async_runtimes::tokio::get_runtime();
25 let set = LocalSet::new();
26 set.block_on(runtime, future)
27}

Callers 6

submit_job_implFunction · 0.85
forget_job_implFunction · 0.85
wait_for_jobs_implFunction · 0.85
get_failed_tasks_implFunction · 0.85
connect_to_server_implFunction · 0.85
stop_server_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected