C++ Win/Linux thread syncronization Event
- by JP
Hello I have some code that is cross-platform by unsing #ifdef OS,
I have a Queue protected by a CriticalSection on Windows, and by a pthread_mutex_t on Linux.
I would like to implement a Wait(timeout) call that would block a thread until something has been enqueued. I though about using WaitForSingleObject on windows but it don't seem to support CriticalSection. Which Win32 and which Linux functions should I use to Wait and Signal for a condition to happen.
Thank