I need to call a function every X seconds to show the progress of a long-running function, but I want to refuse a notification if the function ends before the next tick to update the execution. I just recently started using C ++ 11, and I don't know if there is a way to achieve this using the correct C ++ 11 syntax / objects.
Basically, I'm trying to figure out if there is a way to access the same functions as posix timer_create and timer_delete functions using C ++ 11 streams and asynchronous functions.
I found this question. How to create timer events using C ++ 11? , which covers almost everything I need, but I could not figure out if there is a way to stop the asynchronous call after it is "sent".
Is this possible now in C ++ 11?
source
share