Update lock_example.cpp