diff options
author | Michael Bien <[email protected]> | 2011-04-20 01:59:45 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-04-20 01:59:45 +0200 |
commit | abcef28580df7ba0176390fe6d0a0eb1d969183d (patch) | |
tree | 4dc44bdc78a09fb18f019a53d5ea54dd1c4f3350 /test | |
parent | 8d4602f9058d44e94ddafc9618d32411ae37bb2c (diff) |
fixed race condition in eventsTest()
Diffstat (limited to 'test')
-rw-r--r-- | test/com/jogamp/opencl/CLCommandQueueTest.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java index 1d47ced6..c8c028af 100644 --- a/test/com/jogamp/opencl/CLCommandQueueTest.java +++ b/test/com/jogamp/opencl/CLCommandQueueTest.java @@ -141,11 +141,15 @@ public class CLCommandQueueTest { queue.put1DRangeKernel(vectorAddKernel, 0, elements, groupSize, events); assertEquals(2, events.size()); - queue.putWaitForEvent(events, 0, false) + queue.putWaitForEvent(events, 0, true) .putWaitForEvent(events, 1, true); - queue.putReadBuffer(clBufferC, false) - .putReadBuffer(clBufferD, true); + events.release(); + + queue.putReadBuffer(clBufferC, false, events) + .putReadBuffer(clBufferD, false, events); + + queue.putWaitForEvents(events, true); events.release(); |