Function lwactors::actor
[−]
[src]
pub fn actor<A, S, R, E>(
cpu_pool: &CpuPool,
initial_state: S
) -> ActorSender<A, R, E> where
A: Action<S, R, E> + Send + 'static,
S: Send + 'static,
R: Send + 'static,
E: Send + 'static,
Construct a new actor, requires a CpuPool
and an initial state. Returns a reference that can be cheaply
cloned and passed between threads. A specific implementation is expected to wrap this return value and implement
the required custom logic.