Class ExecuteLock
- java.lang.Object
-
- jmri.jmrit.logixng.implementation.ExecuteLock
-
public class ExecuteLock extends java.lang.Object
Protect the DefaultConditionalNG.execute() method. That method may be called recursively from different threads.
-
-
Constructor Summary
Constructors Constructor Description ExecuteLock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
loop()
Get the status of the lock during loop.boolean
once()
Get the status of the lock.
-
-
-
Constructor Detail
-
ExecuteLock
public ExecuteLock()
-
-
Method Detail
-
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.
-
-