diff options
author | Sven Gothel <[email protected]> | 2011-09-27 11:53:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-27 11:53:37 +0200 |
commit | 6e7ba5a27141b350a8fb7763103dff0d9dd8875a (patch) | |
tree | ff000a8de8cf923846665453f278b0c0ee714d27 /src/java/com/jogamp/common/util/RunnableTask.java | |
parent | e4baba27507ce78e64a150ec6f69fb96f5721a34 (diff) |
RunnableTask: Allow validation whether invoking thread intends to wait for the result
Diffstat (limited to 'src/java/com/jogamp/common/util/RunnableTask.java')
-rw-r--r-- | src/java/com/jogamp/common/util/RunnableTask.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/util/RunnableTask.java b/src/java/com/jogamp/common/util/RunnableTask.java index 3707ce8..5ae102f 100644 --- a/src/java/com/jogamp/common/util/RunnableTask.java +++ b/src/java/com/jogamp/common/util/RunnableTask.java @@ -110,6 +110,12 @@ public class RunnableTask implements Runnable { public boolean isExecuted() { return 0 != ts2 ; } /** + * @return True if invoking thread waits until done, + * ie a <code>notifyObject</code> was passed, otherwise false; + */ + public boolean hasWaiter() { return null != notifyObject; } + + /** * @return A Throwable thrown while execution if any */ public Throwable getThrowable() { return runnableException; } |