Skip to content

Commit

Permalink
Add common usage scenario.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgade committed Nov 29, 2021
1 parent 217e8bd commit 21d23b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Awaits already in-flight calls and their value.

A common application is when concurrent calls require authentication secrets which are expired and should only be
refreshed one at a time. This acts as a queue for the result if another thread of execution already started the network
request.

## Usage

For each call that should only be executed one at a time, create a new instace of `InFlightValueProvider`:
Expand All @@ -23,7 +27,7 @@ original call. Once the value has been returned to all waiting threads, the prov

## Installation

Using the Swift Package Manager, add this line to your `Package.swift`:
Using the Swift Package Manager, add this line to your `Package.swift` as a dependency:

```swift
.package(url: "https://github.com/sgade/InFlightValue", from: "1.0.0"),
Expand Down

0 comments on commit 21d23b3

Please sign in to comment.