How to terminate all hanging Thespian processes?

51 views
Skip to first unread message

Andrei Krivoshei

unread,
Oct 27, 2020, 4:31:00 AM10/27/20
to thespian.py

HI,

during developing and debugging my program, I have got a lot of hanging Actors.
How can I terminate them all?

Best regards,
Andrei

Kevin Quick

unread,
Oct 28, 2020, 11:49:54 AM10/28/20
to Andrei Krivoshei, thespian.py
Hi Andrei,

Thespian will normally clean up actors when the ActorSystem exits, but one common misunderstanding is that the multiproc-style Actor System Bases will startup as daemon (standalone) processes and must be actively shutdown by the application when it exits (via the `ActorSystem.shutdown()` call) if the application does not wish the Actor System to persist.  Commonly multiple applications can exist (and even inter-operate) using a single Actor System framework.

It's also possible based on your other message that you have written actors that do not return from their `receiveMessage()` method; an Actor must return from that method in order to receive subsequent messages, including the `ActorExitRequest` message.  Thespian will try to use signals to stop non-responsive actors when the Actor System is shutdown, but sometimes those actors are doing things that don't respond to signals either.

-Kevin


--
You received this message because you are subscribed to the Google Groups "thespian.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thespianpy+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thespianpy/87715f2f-db0d-479c-a631-a31de36adbfdn%40googlegroups.com.


--
-KQ
Reply all
Reply to author
Forward
0 new messages