
DEThreadActor |
ptolemy.domains.de.kernel.DEThreadActor |
A base class for threaded DE domain actors.
NOTE: This actor is very preliminary. It is not developed and maintained
for a long time. We do not recommend using it. To try multiple threads under
DE semantics, use DDE domain, which is another experimental domain.
This actor, upon its initialization, will start another thread.
The thread communicate with the DEDirector thread by placing
events into the DEEventQueue asynchronously.
Subclass of this class should implement the run() method.
The subclass is executed in an event driven way. More precisely,
the implementation of the run() method should call
waitForNewInputs() after processing all current events. The
calls are blocked until the next time fire() is called.
Recall that the Director (after putting events into the
receiver of the input ports) will call fire() on the actor.
NOTE: The synchronization mechanism is implemented in DECQEventQueue
to ensure the correct multi-threading behaviour.
This implementation does not change the semantics of DEReceiver,
but still supports an asynchronous message passing type of
concurrency.
Author(s): Lukito Muliadi
Version:$Id: DEThreadActor.java,v 1.51 2005/07/08 19:58:14 cxh Exp $
Pt.Proposed Rating:Red (lmuliadi)
Pt.Accepted Rating:Red (cxh)