lock using Lock instead of QLock. qlocks are complicated enough that they need to be able to print during debugging.