aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/common/os/DynamicLibraryBundle.java')
-rwxr-xr-xsrc/java/com/jogamp/common/os/DynamicLibraryBundle.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
index efb6d89..b86a701 100755
--- a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
+++ b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
@@ -33,7 +33,10 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
+import jogamp.common.awt.AWTEDTExecutor;
+
import com.jogamp.common.jvm.JNILibLoaderBase;
+import com.jogamp.common.util.RunnableExecutor;
/**
* Provides bundling of:<br>
@@ -69,6 +72,15 @@ public class DynamicLibraryBundle implements DynamicLookupHelper {
private HashSet<String> toolGetProcAddressFuncNameSet;
private List<String> toolGetProcAddressFuncNameList;
+ /** Returns an AWT-EDT {@link RunnableExecutor} implementation if AWT is available, otherwise {@link RunnableExecutor#currentThreadExecutor}. */
+ public static RunnableExecutor getDefaultRunnableExecutor() {
+ if(Platform.AWT_AVAILABLE) {
+ return AWTEDTExecutor.singleton;
+ } else {
+ return RunnableExecutor.currentThreadExecutor;
+ }
+ }
+
/** Instantiates and loads all {@link NativeLibrary}s incl. JNI libraries. */
public DynamicLibraryBundle(DynamicLibraryBundleInfo info) {
if(null==info) {