12 Aug
2012
12 Aug
'12
1:50 a.m.
Hello, Does boost provide a semaphore (aka an implementation of pthreads's sem_post and sem_wait)? I know boost provides a condition_variable. However, I would prefer a true POSIX semaphore. I created a "semaphore" using internally boost condition variables. Valgrind's tool "helgrind" is reporting false positives on my implentation of a semaphore due to my use of condition_variables. According to http://www.valgrind.org/docs/manual/hg-manual.htm Avoid POSIX condition variables. If you can, use POSIX semaphores (sem_t, sem_post, sem_wait) to do inter-thread event signalling. Thank you, Chris