[][src]Struct axiom::actors::ActorSystemConfig

pub struct ActorSystemConfig {
    pub work_channel_size: u16,
    pub thread_pool_size: u16,
    pub thread_wait_time: u16,
}

Configuration structure for the Axiom actor system. Note that this configuration implements serde serialize and deserialize to allow users to read the config from any serde supported means.

Fields

work_channel_size: u16

The number of slots to allocate for the work channel. This is the channel that the worker threads use to schedule work on actors. The more traffic the actor system takes and the longer the messages take to process, the bigger this should be. The default value is 100.

thread_pool_size: u16

The size of the thread pool which governs how many worker threads there are in the system. The number of threads should be carefully considered to have sufficient concurrency but not overschedule the CPU on the target hardware. The default value is 4.

thread_wait_time: u16

Amount of time to wait in milliseconds between polling an empty work channel. The higher this value is the longer threads will wait for polling and the kinder it will be to the CPU. However, larger values will impact performance and may lead to some threads never getting enough work to justify their existence. The default value is 10.

Methods

impl ActorSystemConfig[src]

pub fn default() -> ActorSystemConfig[src]

Create the config with the default values.

Trait Implementations

impl Debug for ActorSystemConfig[src]

impl Serialize for ActorSystemConfig[src]

impl<'de> Deserialize<'de> for ActorSystemConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ActorMessage for T where
    T: 'static + Serialize + DeserializeOwned + Sync + Send + Any + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]