Interface SystemMessage

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    NoMessage$

    public interface SystemMessage
    extends java.io.Serializable
    System messages are handled specially: they form their own queue within each actor’s mailbox. This queue is encoded in the messages themselves to avoid extra allocations and overhead. The next pointer is a normal var, and it does not need to be volatile because in the enqueuing method its update is immediately succeeded by a volatile write and all reads happen after the volatile read in the dequeuing thread. Afterwards, the obtained list of system messages is handled in a single thread only and not ever passed around, hence no further synchronization is needed.

    INTERNAL API

    NEVER SEND THE SAME SYSTEM MESSAGE OBJECT TO TWO ACTORS