Comments added to clarify TaskExecutorRepeatTemplate

This commit is contained in:
dsyer
2008-04-01 10:31:55 +00:00
parent c2bb83ce73
commit 25281b236e

View File

@@ -122,6 +122,11 @@ public class TaskExecutorRepeatTemplate extends RepeatTemplate {
*/
} while (queue.isEmpty() && !isComplete(context));
/*
* N.B. If the queue is empty then take() blocks until a result appears,
* and there must be at least one because we just submitted one to teh
* task executor.
*/
ResultHolder result = queue.take();
if (result.getError() != null) {
throw result.getError();