samedi 23 mars 2019

How to kill threads waiting more than a minute or 2 in C++

I am new to c++ and have some knowledge of c++ multi threading. I have initially 10 threads and I am increasing number of threads on basis on number of tasks added to the multi map. I am able to increase thread count but not able to kill the threads if tasks are decreased in number. I will like to kill threads which are waiting for more than 2 min and decrease number of threads according to tasks. Can anyone help me on this ??. Please bear with me as I am new to c++ and if this question is already asked. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire