Struct actix_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!
Check if current arbiter is running.
Spawn new thread and run event loop in spawned thread. Returns address of newly created arbiter.
Spawn a future on the current thread. This does not create a new Arbiter or Arbiter address, it is simply a helper for spawning futures on the current thread.
Executes a future on the current thread. This does not create a new Arbiter or Arbiter address, it is simply a helper for executing futures on the current thread.
Send a future to the Arbiter’s thread, and spawn it.
Send a function to the Arbiter’s thread, and execute it. Any result from the function is discarded.
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.
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
Wait for the event loop to stop by joining the underlying thread (if have Some).
Returns a future that will be completed once all currently spawned futures have completed.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Arbiter
impl !UnwindSafe for Arbiter
Blanket Implementations
Mutably borrows from an owned value. Read more