Close task and result queues after workers complete.