From cdef59e2f31c788f8598ec6e59a13c7f34cc0ae5 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sat, 19 Nov 2022 18:03:29 -0500 Subject: [PATCH] task: add more Doxygen comments for PairLock I need to remind myself why it's there, and not just std::lock. Signed-off-by: Zygo Blaxell --- lib/task.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/task.cc b/lib/task.cc index 647e821..ba18ab8 100644 --- a/lib/task.cc +++ b/lib/task.cc @@ -30,7 +30,8 @@ namespace crucible { static thread_local TaskStatePtr tl_current_task; - /// because we don't want to bump -std=c++-17 just to get scoped_lock + /// because we don't want to bump -std=c++-17 just to get scoped_lock. + /// Also we don't want to self-deadlock if both mutexes are the same mutex. class PairLock { unique_lock m_lock1, m_lock2; public: