retry
                                
                                 retry copied to clipboard
                                
                                    retry copied to clipboard
                            
                            
                            
                        Provide usage examples
This library looks great. Unfortunately lack of full examples is makes working with it quite difficult. Uncomplete code faragments are not helpfull. For example:
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
retry.Backoff()(Future {
  // something that can "fail"
})
produce
Multiple markers at this line
    - type mismatch; found : scala.concurrent.Future[Int] required: 
     odelay.Timer
    - type mismatch; found : scala.concurrent.Future[Unit] required: 
     odelay.Timer
or
val future = retry.Directly(4) {
  attempt
}
Leads to type mismatch; found : X required: () =>  scala.concurrent.Future[?]
Could you provide some simple but full examples of usage? With:
- definition (or import) of Success,
- some dummy operation in retry
- performing some operation when result is complete (or failed) ?
thanks for the feedback @Matzz I'll try and clean up the readme. In the meantime you can checkout the test dir for some examples https://github.com/softprops/retry/tree/master/src/test/scala
Tests are very helpful. Thank you.
Hi, @softprops link to tests return 404
@a-nigredo the link now is: https://github.com/softwaremill/retry/tree/master/shared/src/test/scala
Seems to have changed again to https://github.com/softwaremill/retry/tree/master/retry/src/test/scala