Quantcast
Channel: How to properly synchronize threads in c/c++ application? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Daro for How to properly synchronize threads in c/c++ application?

After studying and modifying code samples taken from https://en.cppreference.com/w/cpp/thread/condition_variablefor my needs I created the following:#include <iostream>#include...

View Article



Answer by einpoklum for How to properly synchronize threads in c/c++...

There are many kinds of synchronization patterns between different threads.Your scenario seems to be a good fit for a binary semaphore rather than a mutex:Thread B doesn't "lock and release" - it just...

View Article

How to properly synchronize threads in c/c++ application?

I need to do proper synchronization over several threads in my application. The threads are devided into a group of threads - graup A which may contain more then one thread and thread B. Thread B is...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images