summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLBuffer.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-07-11 19:20:21 +0200
committerMichael Bien <[email protected]>2011-07-11 19:20:21 +0200
commit29deee58472b1c475955718db7b1246fbb1df9d6 (patch)
treed5850055efc4714bfa7587aa7fd22b5db1149163 /src/com/jogamp/opencl/CLBuffer.java
parent519cfb8a41e28e4d10e40496893a9aacf0bce6b1 (diff)
changed resource release synchronization in a way that we can allow concurrent releases of the root and children of the resource hierarchy without a global lock (and a "already released" exception).
Diffstat (limited to 'src/com/jogamp/opencl/CLBuffer.java')
-rw-r--r--src/com/jogamp/opencl/CLBuffer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLBuffer.java b/src/com/jogamp/opencl/CLBuffer.java
index 03e07477..d4e0d003 100644
--- a/src/com/jogamp/opencl/CLBuffer.java
+++ b/src/com/jogamp/opencl/CLBuffer.java
@@ -127,7 +127,7 @@ public class CLBuffer<B extends Buffer> extends CLMemory<B> {
}
@Override
- public void release() {
+ public synchronized void release() {
if(childs != null) {
while(!childs.isEmpty()) {
childs.get(0).release();