A closed set of actors is one that is disconnected from any other actor in the acquaintance graph. If none of the actors in a closed set can send or receive messages to the outside world, then all actors in that set are garbage (even if they appear to be performing work by sending messages to one another).
We'll need to add the following:
[x] Release acknowledgment messages: Actors may not forget about a reference before they receive an acknowledgment.
[x] Implement knowledge sets: A knowledge set is a snapshot of the references an actor knows about at a given time.
[x] Tracking sent messages: If actor A created a reference to B for C, then A cannot forget about that reference until it has been acknowledged by both B and C.
[x] Detect closed sets: Implement an on-line algorithm that a cycle detector can perform on the knowledge sets it receives in order to detect what appear to be closed sets.
[x] Collect knowledge sets somewhere: When an actor A initiates a GC phase, it sends its knowledge set to a designated cycle detector actor CD. Then A sends a request to all its adjacent actors to send their knowledge sets to CD as well.
A closed set of actors is one that is disconnected from any other actor in the acquaintance graph. If none of the actors in a closed set can send or receive messages to the outside world, then all actors in that set are garbage (even if they appear to be performing work by sending messages to one another).
We'll need to add the following: