Skip to content

Commit

Permalink
README fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dehesa committed Feb 14, 2020
1 parent f35da73 commit 8da44b8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -10,13 +10,15 @@ Conbini provides convenience `Publisher`s, operators, and `Subscriber`s to squee

### Publisher Operators

- `retry(on:intervals:)` attempts to recreate a failed subscription with the upstream publisher a given amount of times and waiting the specified number of seconds between failed attempts.
- `retry(on:intervals:)` attempts to recreate a failed subscription with the upstream publisher a given amount of times. Furthermore, it waits the specified number of seconds between failed attempts.

```swift
let apiCalls.retry(on: queue, intervals: [0.5, 2, 5])
// Same functionality to retry(3), but waiting between attemps 0.5, 2, and 3 seconds after a failed attempt.
let apiCallPublisher.retry(on: queue, intervals: [0.5, 2, 5])
// Same functionality to retry(3), but waiting between attemps 0.5, 2, and 5 seconds after each failed attempt.
```

This operator accept any scheduler conforming to `Scheduler` (e.g. `DispatchQueue`, `RunLoop`, etc). You can also optionally tweak the tolerance and scheduler operations.

- `then(maxDemand:_:)` ignores all values and executes the provided publisher once a successful completion is received.
<br>If a failed completion is emitted, it is forwarded downstream.

Expand Down

0 comments on commit 8da44b8

Please sign in to comment.