I have to call a function every X seconds to show the progress of a long running function, but i want to drop the notification if the function ends before the next tick of the progress update. I just recently started using C++11 and i don't know if there is a way to achieve this using proper c++11 syntax/objects.
Basically, I am trying to figure out if there is a way to access the same features as those exposed by the posix functions timer_create and timer_delete using the C++11 threads and async functions.
I did find this question "How to create timer events using C++ 11?", which covers almost everything i need but i couldn't figure out if there's a way to stop the async call once it is "submitted".
Is this possible now in C++11?