Skip to content
Permalink
Browse files

Fixed problems with ExecutionContext

  • Loading branch information
kiroco12 committed Jan 23, 2020
1 parent c3f9937 commit dd8608912105ba9414a3120036ec1fe9569598d5
Showing with 4 additions and 3 deletions.
  1. +3 −2 src/main/scala/fetchlib/FetchTutorialHelper.scala
  2. +1 −1 src/main/scala/fetchlib/UsageSection.scala
@@ -18,8 +18,9 @@ import cats.implicits._

object FetchTutorialHelper {

val executor = new ScheduledThreadPoolExecutor(4)
val executionContext: ExecutionContext = ExecutionContext.fromExecutor(executor)
val executor = new ScheduledThreadPoolExecutor(4)
val executionContext: ExecutionContext =
ExecutionContext.fromExecutor(new java.util.concurrent.ForkJoinPool(2))

implicit val timer: Timer[IO] = IO.timer(executionContext)
implicit val cs: ContextShift[IO] = IO.contextShift(executionContext)
@@ -92,7 +92,7 @@ import org.scalatest.matchers.should.Matchers
*
* = Writing your first data source =
*
* Now that we know about the DataSource` typeclass, let's write our first data source! We'll start by
* Now that we know about the `DataSource` typeclass, let's write our first data source! We'll start by
* implementing a data source for fetching users given their id.
* The first thing we'll do is define the types for user ids and users.
*

0 comments on commit dd86089

Please sign in to comment.
You can’t perform that action at this time.