factor out TaskDispatcher#dispatch_task_to_client