[−][src]Trait pasts::prelude::Interrupt
An interrupt handler.
Required methods
fn new() -> Self
Initialize the shared data for the interrupt.
fn interrupt(&self)
Interrupt blocking to wake up.
fn wait_for(&self)
Blocking wait until interrupt.
Provided methods
fn block_on<F: Future>(f: F) -> <F as Future>::Output
Run a future to completion on the current thread. This will cause the current thread to block.
use pasts::prelude::*; let ret = pasts::ThreadInterrupt::block_on( async { /* Do some work, calling .await on futures */ "Complete!" } ); assert_eq!(ret, "Complete!");