From a584e5dd4b40afec3cc04e1ce4abe3eb2f86e04c Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Tue, 25 Jun 2013 07:02:48 +0200
Subject: NEWT: EDTUtil.invokeStop(..) gets 'wait' argument, allowing
non-blocking shutdown. DisplayImpl.shutdownAll(): Don't block.
---
src/newt/classes/com/jogamp/newt/util/EDTUtil.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
(limited to 'src/newt/classes/com')
diff --git a/src/newt/classes/com/jogamp/newt/util/EDTUtil.java b/src/newt/classes/com/jogamp/newt/util/EDTUtil.java
index 0183da592..0df815609 100644
--- a/src/newt/classes/com/jogamp/newt/util/EDTUtil.java
+++ b/src/newt/classes/com/jogamp/newt/util/EDTUtil.java
@@ -70,7 +70,7 @@ public interface EDTUtil {
* is expected.
*
* @see #invoke(boolean, java.lang.Runnable)
- * @see #invokeStop(java.lang.Runnable)
+ * @see #invokeStop(boolean, java.lang.Runnable)
*/
public void reset();
@@ -113,7 +113,12 @@ public interface EDTUtil {
/**
* Append the final task to the EDT task queue,
- * signals EDT to stop and wait until stopped.
+ * signals EDT to stop.
+ *
+ * If wait
is true
methods
+ * blocks until EDT is stopped.
+ *
+ *
* task
maybe null
* Due to the nature of this method:
*
@@ -122,8 +127,9 @@ public interface EDTUtil {
* - Can be issued from within EDT, ie from within an enqueued task.
* - {@link #reset()} may follow immediately, ie creating a new EDT
*
+ *
*/
- public void invokeStop(Runnable finalTask);
+ public void invokeStop(boolean wait, Runnable finalTask);
/**
* Shall start the thread if not running, task
maybe null for this purpose.
@@ -143,7 +149,7 @@ public interface EDTUtil {
/**
* Wait until EDT task is stopped.
- * No stop
action is performed, {@link #invokeStop(java.lang.Runnable)} should be used before.
+ * No stop
action is performed, {@link #invokeStop(boolean, java.lang.Runnable)} should be used before.
*/
public void waitUntilStopped();
}
--
cgit v1.2.3