Task Launcher - fixed synchronization issues

This commit is contained in:
dragonmacher 2019-05-23 17:19:29 -04:00
parent d74c392101
commit 3765dd0afe
9 changed files with 54 additions and 104 deletions

View file

@ -61,7 +61,7 @@ public class Swing {
*
* @return true if this is the event dispatch thread -OR- is in headless mode.
*/
public static boolean isEventDispatchThread() {
public static boolean isSwingThread() {
if (isInHeadlessMode()) {
return true;
}
@ -70,14 +70,6 @@ public class Swing {
return SwingUtilities.isEventDispatchThread();
}
/**
* A convenience method for {@link #isEventDispatchThread()}
* @return true if this is the Swing thread
*/
public static boolean isSwingThread() {
return isEventDispatchThread();
}
/**
* Wait until AWT event queue (Swing) has been flushed and no more (to a point) events
* are pending.
@ -102,7 +94,7 @@ public class Swing {
return; // squash during production mode
}
if (!isEventDispatchThread()) {
if (!isSwingThread()) {
Throwable t =
ReflectionUtilities.filterJavaThrowable(new AssertException(errorMessage));
Msg.error(SystemUtilities.class, errorMessage, t);

View file

@ -422,7 +422,7 @@ public class SystemUtilities {
* @return true if this is the event dispatch thread -OR- is in headless mode.
*/
public static boolean isEventDispatchThread() {
return Swing.isEventDispatchThread();
return Swing.isSwingThread();
}
/**