ConcurrentChat

ConcurrentChat is available as:

This model opens two interactive shells into which you can type and merges what you type in each with a message sent periodically from a Clock actor. Normally, the InteractiveShell actor blocks until you type something, so each firing would block execution in other parts of the model. Here, each InteractiveShell is placed within a ThreadedComposite with the delay parameter set to UNDEFINED. It executes in its own thread, and when it produces an output, that output is assigned as a time stamp the current time of the enclosing model. In this model, the DE Director is set to synchronize to real time, so time advances in lock step with real time.

For details, see E.A. Lee, "ThreadedComposite: A Mechanism for Building Concurrent and Parallel Ptolemy II Models," EECS Department, University of California, Berkeley, Technical Report No. UCB/EECS-2008-151, December 7, 2008.