Submits a
Runnable for parallel processing, and waits until the task has completed. The specified
ExceptionHandler gets to handle any uncaught exceptions that occurred during the processing of
task.
The tasks submitted to this method are executed independently of each other. No guarantees are given to the order in which submitted tasks will be processed.
@param task the task to run.
@param excHandler an ExceptionHandler that will be handed any uncaught exception that occurred during the execution of task.
@throws InterruptedException if the current thread was interrupted while waiting for the task to complete.
@throws NullPointerException if task is null, or if excHandler is null and an uncaught exception occurrs.