Skip to content

Glossary: C++ Beyond the Basics

std::scoped_lock

Also written: scoped_lock

A lock that locks several mutexes at once, such as `std::scoped_lock lock{stock, sales};`, which avoids deadlock.

Where the book teaches it

Related terms

DeadlockLock guardMutex