Hacker News new | ask | show | jobs
by gpderetta 1173 days ago
An indented scope (that starts with a scoped_lock or some appropriately named function) is more explicit than lock/unlock calls interspersed in the code.

std::scoped_lock allows locking multiple locks.