Cange from queue<Task> to queue<Task*>