From 90660b99631668193e853012459c8d242951e03a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 27 Mar 2012 01:03:30 +0200 Subject: To help analyzing Bug 566, we allow overwriting the 'workaround' with sys prop -Djogamp.debug.NativeLibrary.UseCurrentThreadLibLoader --- src/java/com/jogamp/common/os/DynamicLibraryBundle.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/java/com/jogamp/common') diff --git a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java index b86a701..fc302e9 100755 --- a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java +++ b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; +import jogamp.common.Debug; import jogamp.common.awt.AWTEDTExecutor; import com.jogamp.common.jvm.JNILibLoaderBase; @@ -56,6 +57,8 @@ import com.jogamp.common.util.RunnableExecutor; * */ public class DynamicLibraryBundle implements DynamicLookupHelper { + public static final boolean USE_CURRENT_THREAD_LIBLOADER = Debug.debug("NativeLibrary.UseCurrentThreadLibLoader"); + private DynamicLibraryBundleInfo info; private List> toolLibNames; @@ -74,7 +77,7 @@ public class DynamicLibraryBundle implements DynamicLookupHelper { /** Returns an AWT-EDT {@link RunnableExecutor} implementation if AWT is available, otherwise {@link RunnableExecutor#currentThreadExecutor}. */ public static RunnableExecutor getDefaultRunnableExecutor() { - if(Platform.AWT_AVAILABLE) { + if(!USE_CURRENT_THREAD_LIBLOADER && Platform.AWT_AVAILABLE) { return AWTEDTExecutor.singleton; } else { return RunnableExecutor.currentThreadExecutor; @@ -115,6 +118,7 @@ public class DynamicLibraryBundle implements DynamicLookupHelper { System.err.println(" Glue Lib Names : "+glueLibNames); System.err.println(" Glue Lib Loaded: "+getGlueLibLoadedNumber()+"/"+getGlueLibNumber()+" "+Arrays.toString(glueLibLoaded)+", complete "+isGlueLibComplete()); System.err.println(" All Complete: "+isLibComplete()); + System.err.println(" LibLoaderExecutor: "+info.getLibLoaderExecutor().getClass().getName()); } } -- cgit v1.2.3