[dannunzio] some lock refactoring