Call!! the method from one actor to another acting actor seems to keep the channel open even after the caller has received a response (that is: the future is ready).
For example, using !! to send 11 different messages from one actor to another acting actor, you will receive 11 messages similar to the ones below in the mailbox of the original caller, each of which has a different Channel @xxxx value.
! (scala.actors.Channel @ 11b456f, exit (com.test.app.actor.QueryActor @ 4f7bc2, "normal))
Are these messages awaiting answers from the worker, since the original caller sends the "Exit" message to his own call to exit (), or are they generated at the other end, and for some reason has the print form shown above? By this time, the working actor has already left, so the initial caller !! certainly never get any answers.
This behavior is undesirable since the callerโs original mailbox is populated with these exit messages (one for each channel created for each time !!).
How can this be stopped? Is the original caller automatically โlinkedโ to the response channels created on each of them! to call?
source share