From 150744a8d3023ea5678e913ec3299e9e0bffb976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Tue, 25 Jul 2017 17:32:29 +0200 Subject: [PATCH] Fix example in CP.21 (#1007) --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 37a731d..550c5a3 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -13571,12 +13571,12 @@ This is asking for deadlock: Instead, use `lock()`: // thread 1 - lock(lck1, lck2); + lock(m1, m2); lock_guard lck1(m1, adopt_lock); lock_guard lck2(m2, adopt_lock); // thread 2 - lock(lck2, lck1); + lock(m2, m1); lock_guard lck2(m2, adopt_lock); lock_guard lck1(m1, adopt_lock);