run
function · ferroui-system · v0.5.0
fn run<T: Clone + Send + 'static>(work: impl FnOnce() -> Result<T, Box<dyn std::error::Error + Send + Sync>> + Send + 'static) -> crate::task::Shared<Result<T, crate::ObservableError>>
Runs work on another thread and gives the outcome, which ends on the current thread
(Task.Run): the outcome is the Shared of a task of the current thread
(crate::task::spawn_local), woken from the worker through the schedule of the thread, or the
queue of crate::task::run_pending. An Err of the work, or a panic, is a
TaskWorkError with its message; Shared::flatten is a future of the result.
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.