Function gio::source ·
pub fn spawn_blocking<T, F>(func: F) -> JoinHandle<T> ⓘwhere T: Send + 'static, F: FnOnce() -> T + Send + 'static,
Runs a blocking I/O task on the I/O thread pool.
func on the internal Gio thread pool for blocking I/O operations. The thread pool is
shared with other Gio async I/O operations, and may rate-limit the tasks it receives. Callers
may want to avoid blocking indefinitely by making sure blocking calls eventually time out.
This function should not be used to spawn async tasks. Instead, use
glib::MainContext::spawn_local to run a future.