The combination of your issue 1 and issue 2 make it sound like you
have either (a) an unresponsive Actor, or (b) a blasting Actor, and
your third issue leads me to suspect the former.
In case (a), the Actor might be unresponsive because your
receiveMessage() is performing some blocking call that never returns.
The context for an Actor's receiveMessage() (and the Actor model
itself) is single-threaded within that receiveMessage, so until it
returns the Actor cannot handle any other messages. On the
ActorSystem shutdown() call, each Actor is sent an ActorExitRequest.
This is actually delivered to the Actor's receiveMessage() method
(thus, for your third question, you would match on this message and
perform whatever cleanup you desired), so if the Actor's
receiveMessage() cannot be called because it is blocked on a previous
message then the ActorExitRequest cannot be processed by that Actor.
When an Actor's receiveMessage() exits after handling an
ActorExitRequest, the Actor is then shut down; if the ActorExitRequest
cannot be delivered to the receiveMessage then it will never complete
that processing and perform the shutdown. The ActorSystem has a
10-second failover after which it uses more forceful methods to kill
Actors that did not comply with the ActorExitRequest, which is
probably your second issue.
The other case (b) is a blasting Actor which is an Actor that
continuously blasts outgoing send() messages. There is
back-propagation flow control in Thespian such that a send()
call--which is normally asynchronous in that it completes in the
sending Actor without requiring the receiver to have handled it--is
blocked until the receiver handles messages. This blasting Actor has
two effects: it adds a large number of messages to propagate through
the ActorSystem and thus decreases the available bandwidth for
delivery of messages, and the other effect is that the blocking send()
looks very much like the situation described above for case (a).
I suspect that the second attempt to create a globalName Actor (your
first issue) blocks due to one of the above situations.
If this information doesn't help diagnose your issues, you could
provide the rough implementation of your Actor here that might help
with additional diagnosis.
I'll respond to the KeyboardInterrupt issue on the issue you filed
there (
https://github.com/thespianpy/Thespian/issues/72).
Regards,
Kevin
> To view this discussion on the web visit
https://groups.google.com/d/msgid/thespianpy/285e8647-932a-4a5f-b85c-a97df4427e46n%40googlegroups.com.
--
-KQ