Added a way to wait completion on a batch processor.