Added constructor taking std::initializer_list<Task>
forgotten locks have been added