I was hoping someone could tell me if my understanding on the following 3 locks is correct and possibly add to it. my main concern is speed with minimum overhead.
boost::lock_guard
boost::unique_lock
boost::scoped_lock
boost::lock_guard
is the lightest kind of a lock and is only shared amongst members of a process. The unique_lock
is an improved version of lock_guard with more functionality. The scoped_lock
allows locking across different processes.The scoped_lock is the heaviest of all locks.Is my understanding correct. The thread here however states that scoped_lock is similar to unique_lock. if so does that mean scoped_lock
is as heavy as unique_lock
?