locking example