SCAL-355: refactoring mutexing for simulations.