Snippets tagged sleep

  • Async.Sleep with immediate cancellation

    Implementation of Async.Sleep in f# 2.0 doesn't allow break it execution until the time elapsed. Here is the alternate implementation which support immediate cancellation. According to discussion http://stackoverflow.com/questions/9041491/is-there-any-reason-why-async-sleep-can-not-be-canceled-immediately .

    2 people like this

    Posted: 5 years ago by Andrei Kolomentsev

  • Retry loop, no tricks

    Less-nonsense 8-line retry function that will retry a function a specified up to `maxRetries` times while it throws. After the retries, any remaining exception is allowed to propagate. Accepts a before function to allow you to wait/report when a retry is taking place

    2 people like this

    Posted: 2 years ago by Ruben Bartelink