3 ms·
this lambda approach seems actually better in the visibility sense since the mutex access is a separately indented block. When I'm writing multithreaded code,
by snozolli 4y ago
this lambda approach seems actually better in the visibility sense since the mutex access is a separately indented block.
When I'm writing multithreaded code, the first line of any block containing a RAII lock is the lock. Any subsection of code that needs another lock gets its own block.