Struct actix::Arbiter[][src]

pub struct Arbiter { /* fields omitted */ }
Expand description

An Arbiter represents a thread that provides an asynchronous execution environment for futures and functions.

When an arbiter is created, it spawns a new OS thread, and hosts an event loop.

Implementations

Spawn a new Arbiter thread and start its event loop.

Panics

Panics if a System is not registered on the current thread.

Return a handle to the this Arbiter’s message sender.

Return a handle to the current thread’s Arbiter’s message sender.

Panics

Panics if no Arbiter is running on the current thread.

Stop Arbiter from continuing it’s event loop.

Returns true if stop message was sent successfully and false if the Arbiter has been dropped.

Send a future to the Arbiter’s thread and spawn it.

If you require a result, include a response channel in the future.

Returns true if future was sent successfully and false if the Arbiter has died.

Send a function to the Arbiter’s thread and execute it.

Any result from the function is discarded. If you require a result, include a response channel in the function.

Returns true if function was sent successfully and false if the Arbiter has died.

Wait for Arbiter’s event loop to complete.

Joins the underlying OS thread handle. See JoinHandle::join.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.