Also, this lock is aliasing the class-wide lock; I'm not sure if that's on purpose or not, but it's definitely breaking the safety of the condition variable below.