This is exactly what we want to happen. Our thread is sleeping, waiting for a particular condition to become true, without performing any kind of busy polling that would waste CPU time. From our thread's perspective, it's simply waiting for the pthread_cond_wait() call to return.

picture loading error handler
12 thought(s)12

Threads in C

pthreads library and threaded programming in C

Explore more quotes

Wolf, an Appalachian Trail Hiker