Locking example