Specify the algorithm task queues used as per-scope queues; Add error handling to prevent indefinite waiting