-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1508 from mpilquist/topic/unblock-plus-blocker
Replaced blocking ExecutionContext with Blocker
- Loading branch information
Showing
18 changed files
with
175 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,5 @@ | ||
package fs2 | ||
|
||
import scala.concurrent.ExecutionContext | ||
|
||
import cats.effect.{IO, Resource} | ||
import cats.implicits._ | ||
|
||
import java.util.concurrent.Executors | ||
|
||
import fs2.internal.ThreadFactories | ||
|
||
trait TestPlatform { | ||
|
||
def isJVM: Boolean = true | ||
|
||
val blockingExecutionContext: Resource[IO, ExecutionContext] = | ||
Resource | ||
.make( | ||
IO(ExecutionContext.fromExecutorService( | ||
Executors.newCachedThreadPool(ThreadFactories.named("fs2-blocking", true)))))(ec => | ||
IO(ec.shutdown())) | ||
.widen[ExecutionContext] | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.