Struct ntex_rt::Arbiter [−][src]
pub struct Arbiter { /* fields omitted */ }
Expand description
Arbiters provide an asynchronous execution environment for actors, functions and futures. When an Arbiter is created, it spawns a new OS thread, and hosts an event loop. Some Arbiter functions execute on the current thread.
Implementations
Returns the current thread’s arbiter’s address. If no Arbiter is present, then this function will panic!
Spawn new thread and run event loop in spawned thread. Returns address of newly created arbiter.
Send a future to the Arbiter’s thread, and spawn it.
Send a function to the Arbiter’s thread. This function will be executed asynchronously. A future is created, and when resolved will contain the result of the function sent to the Arbiters thread.
Send a function to the Arbiter’s thread, and execute it. Any result from the function is discarded.
Check if arbiter storage contains item
Get a reference to a type previously inserted on this arbiter’s storage.
Panics is item is not inserted
Get a mutable reference to a type previously inserted on this arbiter’s storage.
Panics is item is not inserted
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Arbiter
impl !UnwindSafe for Arbiter
Blanket Implementations
Mutably borrows from an owned value. Read more