509510511512513514515516517518519
log.error("Failed to process task for key " + key, e); } finally { long finished = tasksFinished.incrementAndGet(); if (finished == tasksSubmitted.longValue()) { synchronized (context) { context.notifyAll(); } } } } });