public abstract class CLRecursiveTask<C extends CLQueueContext, R> extends RecursiveTask<R> implements CLPoolable<C, R> {
@Override
protected final R compute() {
CommandQueueThread thread = (CommandQueueThread)Thread.currentThread();
final Object key = getContextKey();
CLQueueContext context = thread.getContextMap().get(key);
if(context == null) {
context = createQueueContext(thread.getQueue());
thread.getContextMap().put(key, context);
}
@SuppressWarnings("unchecked")
CLPoolable<CLQueueContext, R> task = (CLPoolable<CLQueueContext, R>) this;