Class LocalZenoUtilities


  • public class LocalZenoUtilities
    extends java.lang.Object
    Utilities for DDE LocalZeno demonstration.
    Since:
    Ptolemy II 4.1
    Author:
    Christopher Brooks
    Pt.AcceptedRating:
    Red (davisj)
    Pt.ProposedRating:
    Yellow (davisj)
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void sleepProcess​(TypedAtomicActor actor)
      Sleep the current thread for 100 ms.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sleepProcess

        public static void sleepProcess​(TypedAtomicActor actor)
                                 throws IllegalActionException
        Sleep the current thread for 100 ms. If the Thread.sleep() call gets interrupted, and ProcessDirector.stop() was called, then we throw a TerminateProcessException, which stops all the other Processes. If Thread.sleep() gets interrupted and ProcessDirector.stop() was not called, then we throw an IllegalActionException.

        This method is used to slow down execution for the purposes of illustration.

        Parameters:
        actor - The actor used for checking whether stop() was called.
        Throws:
        IllegalActionException - If the Thread.sleep() call gets interrupted and stop() was not called on the director.