xhawk18 / promise-cpp

C++ promise/A+ library in Javascript style.
MIT License
672 stars 92 forks source link

How to retry promise? #2

Closed frankinshtein closed 6 years ago

frankinshtein commented 7 years ago

with number of retries, js example: https://stackoverflow.com/questions/38213668/promise-retry-design-patterns

xhawk18 commented 6 years ago

"asynchonized retry" needs a timer, you can checkout the test code test/test_timer.cpp to find out how to apply promise-cpp with boost::asio timer, and then implement "retry" after timer expires.