Сhanged Lock method parameter type from bool to object.