Continuous update loop for task info. Wait for a short period for task state to change, and
if it does not, return the current state of the task. This will cause stats to be updated at a
regular interval, and state changes will be immediately recorded.