FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    block_on

    function · ferroui-system · v0.5.0

    fn block_on<T: Clone + 'static>(future: impl Future<Output = Result<T, crate::ObservableError>> + 'static) -> Result<T, crate::ObservableError>
    

    Runs future on the current thread until it ends, waiting for wakes from other threads in between (a thread with nothing else to run: a console program, a test) (crate::task::block_on).

    Panics

    With the panic of the future. Never returns when nothing wakes the future again: a future that waits for this thread itself (a scheduler of the thread, a task that only this thread ends) has to be ended by something that runs before it waits.

    View source

    Deprecated since 0.5.0. use ferroui_system::task::block_on, which takes any future

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.