919293949596979899100101
synchronized (this) { if (completed) dispatchFutureCompleted(listener); else { if (listeners == null) // lazy load listeners = new LinkedList(); listeners.add(listener); } } } }
38394041424344454647
} private Queue getQueue() { Queue queue = (Queue) local.get(); if (queue == null) { queue = new LinkedList(); local.set(queue); } return queue; }