aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-26 21:43:20 +0100
committerSven Gothel <[email protected]>2011-02-26 21:43:20 +0100
commit76444dce2b678a7f6769564abac4f8a73f414609 (patch)
tree09358c0a48715c69e7e8f511cf3d9be729177509 /src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
parent77546f8968779fbdcfe58f89c6924803642889c7 (diff)
Clean/Fix: Threading Code
- Remove unsafe double checked locking - Annotate safe double checked locking (volatile) - use 'static final' if possible
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
index a681c5b8f..dd493f5ee 100644
--- a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
+++ b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
@@ -103,13 +103,7 @@ public class AWTThreadingPlugin implements ThreadingPlugin {
break;
case ThreadingImpl.WORKER:
- if (!GLWorkerThread.isStarted()) {
- synchronized (GLWorkerThread.class) {
- if (!GLWorkerThread.isStarted()) {
- GLWorkerThread.start();
- }
- }
- }
+ GLWorkerThread.start(); // singleton start via volatile-dbl-checked-locking
try {
GLWorkerThread.invokeAndWait(r);
} catch (InvocationTargetException e) {