Add example with_lock_guard.