Moved to std::mutex, all but CalculationTask, which is not actually used