
3 Apr
2009
3 Apr
'09
2:25 a.m.
Jean-Sebastien Stoezel wrote:
Hi,
I need to synchronize 2 threads, that is once one is done doing something, it should activate another thread that had been waiting in a pending state. I see the thread library offers mutexes and nothing else. I guess mutexes would do, but I do not believe I should use mutexes for my application. Mutexes are supposed to provide mutual exclusion when critical data is accessed. Semaphores should be used for what I want to do.
You can use condition variables for signalling: http://www.boost.org/doc/libs/1_38_0/doc/html/thread/synchronization.html#th... -- Sohail Somani http://uint32t.blogspot.com