dimanche 6 mai 2018

C++ How to Use Semaphore to Limit Maximum of Threads

I did some search on the internet, but I can't find any examples showing to limit to number of threads using c++. Let say the variable maxThreads is 5, can someone give an example of how to use semaphore to run a same function with maximum of 5 threads at a time?

Aucun commentaire:

Enregistrer un commentaire