Class SharedQueue

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class SharedQueue
    extends Queue
    A queue that outputs the next token to an output channel that is ready to receive it. It can have multiple output channels, and the same number of trigger channels. Initially all output channels are assumed to be ready. When a token is available, it is sent to the first channel that is ready, and that channel is marked not ready. When all channels are not ready, the token would be queued. If the number of tokens already in the queue is equal to the queue capacity (0 means infinity), then new tokens are lost.

    To make an output channel ready after a token is sent to it, a triggering signal needs to be received in the corresponding channel of the trigger port.

    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Thomas Huining Feng
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Red (tfeng)