Skip to content

Commit

Permalink
Update documentation and other files (#288)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
47erbot and github-actions[bot] authored Apr 22, 2020
1 parent 4a0829e commit ea872ef
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ Let's run it and wait for the fetch to complete. We'll use `IO#unsafeRunTimed` f
import scala.concurrent.duration._

Fetch.run[IO](fetchOne).unsafeRunTimed(5.seconds)
// --> [241] One ToString 1
// <-- [241] One ToString 1
// --> [233] One ToString 1
// <-- [233] One ToString 1
// res0: Option[String] = Some("1")
```

Expand All @@ -152,8 +152,8 @@ When executing the above fetch, note how the three identities get batched, and t

```scala
Fetch.run[IO](fetchThree).unsafeRunTimed(5.seconds)
// --> [241] Batch ToString NonEmptyList(1, 2, 3)
// <-- [241] Batch ToString NonEmptyList(1, 2, 3)
// --> [233] Batch ToString NonEmptyList(1, 2, 3)
// <-- [233] Batch ToString NonEmptyList(1, 2, 3)
// res1: Option[(String, String, String)] = Some(("1", "2", "3"))
```

Expand Down Expand Up @@ -191,12 +191,12 @@ When executing the above fetch, note how the three identities get requested in p

```scala
Fetch.run[IO](fetchUnbatchedThree).unsafeRunTimed(5.seconds)
// --> [241] One UnbatchedToString 1
// --> [242] One UnbatchedToString 2
// --> [243] One UnbatchedToString 3
// <-- [241] One UnbatchedToString 1
// <-- [242] One UnbatchedToString 2
// <-- [243] One UnbatchedToString 3
// --> [233] One UnbatchedToString 1
// --> [235] One UnbatchedToString 2
// --> [236] One UnbatchedToString 3
// <-- [233] One UnbatchedToString 1
// <-- [235] One UnbatchedToString 2
// <-- [236] One UnbatchedToString 3
// res2: Option[(String, String, String)] = Some(("1", "2", "3"))
```

Expand Down Expand Up @@ -242,10 +242,10 @@ Note how the two independent data fetches run in parallel, minimizing the latenc

```scala
Fetch.run[IO](fetchMulti).unsafeRunTimed(5.seconds)
// --> [243] One Length one
// --> [244] One ToString 1
// <-- [244] One ToString 1
// <-- [243] One Length one
// --> [235] One ToString 1
// --> [234] One Length one
// <-- [235] One ToString 1
// <-- [234] One Length one
// res3: Option[(String, Int)] = Some(("1", 3))
```

Expand All @@ -264,8 +264,8 @@ While running it, notice that the data source is only queried once. The next tim

```scala
Fetch.run[IO](fetchTwice).unsafeRunTimed(5.seconds)
// --> [242] One ToString 1
// <-- [242] One ToString 1
// --> [236] One ToString 1
// <-- [236] One ToString 1
// res4: Option[(String, String)] = Some(("1", "1"))
```

Expand Down

0 comments on commit ea872ef

Please sign in to comment.