Implements the TaskRunner framework. Acts as a thread that works with the
TaskQuerier to take the next sorted (aka ones that have been sorted with the
Workflow PrioritySorter) task and then leverage the Engine's Runner to
execute the task.
The TaskRunner thread first pops a task off the list using
TaskQuerier.getNext()
and then so long as the thread's
runner
has open slots as returned by
, and is
false and
isRunning()
is true, then the task is handed off to the
runner for execution.
The TaskRunner thread can be paused during which time it waits
seconds, wakes up to see if it's unpaused, and then goes
back to sleep if not, otherwise, resumes executing if it was unpaused.