dequeue takes a list of tasks