clang-format
Added an example with locking.