dimanche 19 janvier 2020

How to create thread every X seconds but only if previous iteration thread is finished in C++11?

I have a following requirement: "Create a detached worker thread at every X seconds but only if previous detached thread is finished."

Note that, I have a requirement of creating detached thread, because I don't want my main thread to wait for it to finish.

I am using C++11 thread class.

Any help on this?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire