aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-05-06 18:26:45 +0200
committerMichael Bien <[email protected]>2011-05-06 18:26:45 +0200
commit7b85a8f6edcd4140da301248c54145bbf9b98781 (patch)
treeb4d8716d75253d1bb57c0e625af3c457b8927761 /src/com/jogamp/opencl
parentba3c4f8e28235c1e0780a88d7cd087abfaddc61b (diff)
worker threads should be deamons and should have a name (like all evil things)
Diffstat (limited to 'src/com/jogamp/opencl')
-rw-r--r--src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java8
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);
}
}