logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

sc::ThreadLockHolder - Acquire a lock on creation and release it on destruction.

Author

       Generated automatically by Doxygen for MPQC from the source code.

Version 2.3.1                                    Sun Oct 4 2020                          sc::ThreadLockHolder(3)

Detailed Description

       Acquire a lock on creation and release it on destruction.

       This should be used to lock and unlock ThreadLock objects to provide exception safety.

Name

       sc::ThreadLockHolder - Acquire a lock on creation and release it on destruction.

Synopsis

       #include <thread.h>

   PublicMemberFunctionsThreadLockHolder (const Ref< ThreadLock > &l)
           Acquires the lock.
       void unlock ()
           Release the lock before the DTOR is called, if it is still held.
       void lock ()
           Acquire the lock once more.
       ~ThreadLockHolder ()
           Releases the lock if it is still held.

See Also