SbCondVar(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ’– SbCondVar(3) πŸ’–

ok so bestie, we're in the Library Functions Manual and today's main character is SbCondVar β€” yes it's giving "my brain hurts" but honestly? it's iconic once you get it. 🧚


✨ NAME ✨

SbCondVar β€” a class for synchronizing access to global variables. no cap, that's literally its whole job. πŸŽ€


✨ SYNOPSIS ✨

#include <Inventor/threads/SbCondVar.h>

🌸 Public Member Functions 🌸

SbCondVar (void)
~SbCondVar (void)
SbBool wait (SbMutex &mutex)
SbBool timedWait (SbMutex &mutex, SbTime period)
void wakeOne (void)
void wakeAll (void)

πŸ¦‹ Detailed Description πŸ¦‹

A class for synchronizing access to global variables.

ok so picture this: condition variables are the thing you use to protect global variables when you've got multiple threads running concurrently. it's the group chat moderator of your code, fr fr. πŸ’…


🌈 Constructor & Destructor Documentation 🌈

🌟 SbCondVar::SbCondVar (void ) [inline] 🌟

Constructor. it's born ✨

🌟 SbCondVar::~SbCondVar (void ) [inline] 🌟

Destructor. it's gone πŸ’€ (but respectfully)


πŸŽ€ Member Function Documentation πŸŽ€

⭐ SbBool SbCondVar::wait (SbMutex & mutex) [inline] ⭐

This method blocks the calling thread until another thread calls wakeOne() or wakeAll() on the SbCondVar object. like bestie is literally sitting there waiting for a text back. 😭

⭐ SbBool SbCondVar::timedWait (SbMutex & mutex, SbTime period) [inline] ⭐

This method blocks the calling thread until another thread calls wakeOne() or wakeAll() on the object β€” but if that does not happen within period, the thread is woken again anyways. it's giving "if you don't reply in 20 mins i'm moving on". 🫢

TRUE is returned when the thread wakes because either wakeOne() or wakeAll() was called, FALSE is returned if the wait times out. so true = they texted back, false = you gave up. πŸ’›

⭐ void SbCondVar::wakeOne (void ) [inline] ⭐

This method wakes up one of the threads waiting on this SbCondVar. just one. singular. the chosen one. πŸ‘‘

⭐ void SbCondVar::wakeAll (void ) [inline] ⭐

This method wakes up all the threads waiting on this SbCondVar. everyone's invited to the function, periodt. πŸ”₯


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for Coin from the source code. (yes the robots wrote this one, we just gave it a glow-up. πŸ€–βœ¨)


lowkey reminder: this whole thing is about threads and mutexes, so if you're out here changing global variables from multiple threads with no cond var, that's not a vibe check, that's a race condition. protect your globals bestie. πŸ™ˆ

ok bye, love you, go read the source πŸ’–

this has been Coin, Version 3.1.3, SbCondVar(3) β€” mwah, catch you on the next manpage πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from