Long polling for task states.