# SDL\_CondSignal usage

**URL:** <https://discourse.libsdl.org/t/sdl-condsignal-usage/14370>\
**Category:** SDL Development\
**Created:** [March 7, 2007, 8:02pm UTC](https://discourse.libsdl.org/t/sdl-condsignal-usage/14370 "2007-03-07T20:02:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjay\_kumar\_gupta](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@sanjay\_kumar\_gupta](https://discourse.libsdl.org/u/sanjay_kumar_gupta)\
**Post date:** [March 7, 2007, 8:02pm UTC](https://discourse.libsdl.org/t/sdl-condsignal-usage/14370/1 "2007-03-07T20:02:00Z")

</div>

Hi,  
man page of function SDL\_CondSignal(cond) says that it will Restart a thread which is waiting on condition variable (here it is cond).  
What if one thread is calling function SDL\_CondSignal(cond) and none of the other threads has called SDL\_CondWait(cond,mutex).  
what will be the effect of calling SDL\_CondSignal(cond) in this case even if no one is waiting on this condition variable?

Thanks & regards,  
Sanjay

---

<div class="post-metadata">

**Author:** ![Alexis\_Naveros](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/a/b5ac83/32.png) [@Alexis\_Naveros](https://discourse.libsdl.org/u/Alexis_Naveros)\
**Post date:** [March 7, 2007, 8:34pm UTC](https://discourse.libsdl.org/t/sdl-condsignal-usage/14370/2 "2007-03-07T20:34:26Z")

</div>

> man page of function SDL\_CondSignal(cond) says that it will Restart a thread which is waiting on condition variable (here it is cond).  
> What if one thread is calling function SDL\_CondSignal(cond) and none of the other threads has called SDL\_CondWait(cond,mutex).  
> what will be the effect of calling SDL\_CondSignal(cond) in this case even if no one is waiting on this condition variable?

Same as with Pthreads signal surely, SDL\_CondSignal has no effect and execution continues. After the condition variable has been signaled, any threading waiting on it will block as usual.

Alexis
