Skip to content

Provide usage examples #8

@Matzz

Description

@Matzz

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)
    ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions