SbThreadAutoLock(3)
π NAME π
SbThreadAutoLock β the simple convenience class for locking access to a function. that's it, that's the whole vibe β¨
πΈ SYNOPSIS πΈ
#include <Inventor/threads/SbThreadAutoLock.h>
π Public Member Functions
SbThreadAutoLock(SbMutex *mutexptr)SbThreadAutoLock(SbThreadMutex *mutexptr)~SbThreadAutoLock()
π¦ Protected Attributes
SbMutex * mutexSbThreadMutex * recmutex
β¨ Detailed Description β¨
okay bestie, so. SbThreadAutoLock is the simple convenience class for locking access to a function. π«Ά
what it does is give you a simple convenience mechanism for automatically locking access to a function that is not re-entrant. no cap.
Usage example, and yes you're gonna want to screenshot this:
void
myfunction(void)
{
SbThreadAutoLock lock(aMutexPtr);
// [other code]
}
the way this works is: in the class constructor, SbMutex::lock() gets called on the mutex. and then when the function exits β this is the convenience part, this is the whole moment, the main character energy β the destructor gets automatically invoked, and it calls SbMutex::unlock() on that same mutex. it's giving RAII. it's giving scoped lock. it's giving iconic. π
π Constructor & Destructor Documentation π
π SbThreadAutoLock::SbThreadAutoLock (SbMutex * mutex) [inline]
the constructor calls SbMutex::lock() on mutex. that's it. that's the job. slay.
π SbThreadAutoLock::SbThreadAutoLock (SbThreadMutex * mutex) [inline]
the constructor calls SbThreadMutex::lock() on mutex. same energy, different mutex type. π«
π SbThreadAutoLock::~SbThreadAutoLock () [inline]
the destructor calls unlock() on the mutex that got passed in as a parameter to the constructor. she cleans up after herself. we love a queen who does her own dishes π
π Member Data Documentation π
β SbThreadMutex* SbThreadAutoLock::recmutex [protected]
heads up bestie: this API member is considered internal to the library, as it is not likely to be of interest to the application programmer. so likeβ¦ look away π
π Author π
Generated automatically by Doxygen for Coin from the source code. no human wrote this one, it manifested itself fr fr π
and that's the whole page, bestie!! this was SbThreadAutoLock(3) from the Coin Library Functions Manual, Version 3.1.3 β ty for reading, ily, go lock something safely πβ¨ππ¦
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms