I am supposed to create a child thread at every 5 mins. But before starting a new thread, I want to terminate previously created child thread, if still running. So far from web search, I can sense that it is possible with C++11 using future and promise. But any example would help me to get more clear idea on this.
Thanks in advance.