Class ExecuteLock

java.lang.Object
jmri.jmrit.logixng.implementation.ExecuteLock

public class ExecuteLock extends Object
Protect the DefaultConditionalNG.execute() method. That method may be called recursively from different threads.
  • Constructor Details

  • Method Details

    • once

      public boolean once()
      Get the status of the lock. If the call succeeds, the caller is responsible to loop while the method loop() returns true.
      Returns:
      true if the caller gets the lock.
    • loop

      public boolean loop()
      Get the status of the lock during loop. The caller is responsible to loop while the method returns true.
      Returns:
      true if the caller still has the lock.