Locking example demonstrated