summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/windows/wgl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-09-18 02:29:24 +0200
committerSven Gothel <[email protected]>2013-09-18 02:29:24 +0200
commitb54e3dfb6a8490fbe7dcd3fe1927241bd5328335 (patch)
tree36fa7d32e34e706e6e6b9f8ad223e5b5e4102e88 /src/jogl/classes/jogamp/opengl/windows/wgl
parent988da6f30322176b8301d17709f5461c35a01e19 (diff)
Fix SharedResourceRunner's potential race-conditions. Use top-level synchronization simplifying code and better robustness.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl')
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
index 338a351cb..156e75196 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -255,21 +255,15 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
class SharedResourceImplementation implements SharedResourceRunner.Implementation {
@Override
public void clear() {
- synchronized(sharedMap) {
- sharedMap.clear();
- }
+ sharedMap.clear();
}
@Override
public SharedResourceRunner.Resource mapPut(String connection, SharedResourceRunner.Resource resource) {
- synchronized(sharedMap) {
- return sharedMap.put(connection, resource);
- }
+ return sharedMap.put(connection, resource);
}
@Override
public SharedResourceRunner.Resource mapGet(String connection) {
- synchronized(sharedMap) {
- return sharedMap.get(connection);
- }
+ return sharedMap.get(connection);
}
@Override
public Collection<SharedResourceRunner.Resource> mapValues() {