diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java b/src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java index 205f0393..92828e95 100644 --- a/src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java +++ b/src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java @@ -129,16 +129,18 @@ public class CLCommandQueuePool implements CLResource { } public synchronized Thread newThread(Runnable r) { - CLCommandQueue queue = queues.get(index++); - return new QueueThread(queue); + CLCommandQueue queue = queues.get(index); + return new QueueThread(queue, index++); } } private static class QueueThread extends Thread { private final CLCommandQueue queue; - public QueueThread(CLCommandQueue queue) { + public QueueThread(CLCommandQueue queue, int index) { + super("queue-worker-thread-"+index+"["+queue+"]"); this.queue = queue; + this.setDaemon(true); } } |