Package io.openems.common.utils
Class Mutex
java.lang.Object
io.openems.common.utils.Mutex
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Mutex
public Mutex(boolean initiallyPermitted)
-
-
Method Details
-
await
Wait for arelease()
.- Throws:
InterruptedException
- on wait error
-
awaitOrTimeout
Wait for arelease()
with a timeout.- Parameters:
timeout
- the timeout valueunit
- the timeoutTimeUnit
- Throws:
InterruptedException
- on wait error
-
release
public void release()Release theMutex
.
-