Pass array of tasks
Lock container
Refactoring