pub trait Blocking<A>where
    A: Actor,{
    // Provided methods
    fn started(&mut self, _: &mut Context<A>) { ... }
    fn state(&mut self, _: &mut Context<A>) -> BlockingState { ... }
    fn aborted(&mut self, _: &mut Context<A>) { ... }
    fn finished(&mut self, _: &mut Context<A>) { ... }
}
Expand description

An abstraction for Actor’s blocking routine

NOTE that any new message sent to this actor will be REJECTED when the actor got any new Blcoker.

Blocker is not recoverable once gets aborted

Provided Methods§

source

fn started(&mut self, _: &mut Context<A>)

called before the blocker get started

source

fn state(&mut self, _: &mut Context<A>) -> BlockingState

Runtime control of the Blcoker to abort the actor.

Real-Time control or more elaborated execution could be achieved right here

source

fn aborted(&mut self, _: &mut Context<A>)

called before the blocker get aborted

source

fn finished(&mut self, _: &mut Context<A>)

called after the blocker successfully finished

Implementors§