Package com.diozero.util
Class EventLock
java.lang.Object
com.diozero.util.EventLock
public class EventLock extends Object
-
Constructor Summary
Constructors Constructor Description EventLock()
-
Method Summary
-
Constructor Details
-
EventLock
public EventLock()
-
-
Method Details
-
doWait
Wait indefinitely for set() to be called.- Returns:
- True if set() was called, false woken unexpectedly.
- Throws:
InterruptedException
- If interrupted.
-
doWait
Wait the specified time period for set() to be called.- Parameters:
timeout
- Timeout value in milliseconds.- Returns:
- True if set() was called, false if timed out waiting.
- Throws:
InterruptedException
- If interrupted.
-
set
public void set() -
clear
public void clear()
-