#actix #actor #lifecycle #signal #terminate


Manage the lifecycle of an actix actor with its address

2 unstable releases

0.2.0 Mar 18, 2022
0.1.1 Mar 18, 2022
0.1.0 Jul 22, 2021

#1257 in Asynchronous

49 downloads per month

MIT license

55 lines


crates.io Documentation

Manage the lifecycle of an actix actor with its address.

If you want to stop/terminate an actor, you call ActorContext::stop or ActorContext::terminate within its execution context.

However, sometimes you have access to its address only. This crate adds a bunch of methods to the address so that you may stop or terminate the actor outside its running context.

Minimum supported rust version: 1.50.0

Get Started

Add the following line to your Cargo.toml.

actix-signal = { version = "0.1", features = ["derive"] }


use actix::{Actor, Context};
use actix_signal::SignalHandler;

struct MyActor;

impl Actor for MyActor {
    type Context = Context<Self>;

let actor = MyActor;
let addr = actor.start();

addr.stop();        // Stop the actor
addr.terminate();   // Terminate the actor

Feature flags

derive - Provide #[derive(SignalHandler)] proc-macro.




~167K SLoC