2 Threads, one waiting for certain variable update, best way to wait?

Hello everyone!

I have 2 threads.

One is main thread what is updating certain variable sometimes.
Other thread is waiting for variable to change.

What is the best way to make other thread waiting for variable change?

Right now i'm having this on my mind:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686915(v=vs.85).aspx
Standard C++ uses std::condition_variable for this
Topic archived. No new replies allowed.