void (CompletionProgressIndicator indicator) { try { indicator.withSingleUpdate(() -> { for (CompletionResult result : myBatchList) { indicator.addItem(result); } }); } finally { myBatchList.clear(); } }