Lock repository when working with it

Shouldn't this be m_barrier?