Function ractor::time::exit_after

source ·
pub fn exit_after(period: Duration, actor: ActorCell) -> JoinHandle<()>
Expand description

Sends the stop signal to the actor after a specified duration, attaching a reason of “Exit after {}ms” by default

  • period - The Duration representing the time to delay before sending
  • actor - The ActorCell representing the crate::Actor to exit after the duration

Returns: The JoinHandle which denotes the backgrounded operation. To cancel the exit operation, you can abort the handle