lundi 20 juillet 2020

C++ Timer Run on Main Thead Without Block (C++11/14/17/20)

How to implement a timer run on main thread without block main thread in C++11/14/17/20

Like:

  startTimerInCurrentTheadWithoutBlockCurrentThread(Seconds(1),[](){
//invoke method every 1 second
       method();
   });

I know there are a lot project like:https://ift.tt/2WE6nx9

but they all start a new thread.

Aucun commentaire:

Enregistrer un commentaire