aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/util/locks/LockExt.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/common/util/locks/LockExt.java')
-rw-r--r--src/java/com/jogamp/common/util/locks/LockExt.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/util/locks/LockExt.java b/src/java/com/jogamp/common/util/locks/LockExt.java
index 860c03a..974c11a 100644
--- a/src/java/com/jogamp/common/util/locks/LockExt.java
+++ b/src/java/com/jogamp/common/util/locks/LockExt.java
@@ -44,5 +44,16 @@ public interface LockExt extends Lock {
boolean isOwner(Thread thread);
- void validateLocked();
+ /**
+ * @throws RuntimeException if current thread does not hold the lock
+ */
+ void validateLocked() throws RuntimeException;
+
+ /**
+ * Execute the {@link Runnable Runnable taskAfterUnlockBeforeNotify} while holding the exclusive lock.
+ * <p>
+ * Then release the lock.
+ * </p>
+ */
+ void unlock(Runnable taskAfterUnlockBeforeNotify);
}