Function glib::future_with_timeout
source · [−]pub async fn future_with_timeout<T>(
timeout: Duration,
fut: impl Future<Output = T>
) -> Result<T, FutureWithTimeoutError>
Expand description
Add a timeout to a Future
.
The Future
must be spawned on an Executor
backed by a glib::MainContext
.