cats-effect
cats-effect copied to clipboard
The pure asynchronous runtime for Scala
This is a small internal refactoring of the "new" `Dispatcher`. Currently during cancellation there is a racy write/read of `action` (a plain `var`), and this is resolved by spinning on...
## About this PR 📦 Updates * [org.scala-native:nscplugin](https://github.com/scala-native/scala-native) * [org.scala-native:sbt-scala-native](https://github.com/scala-native/scala-native) from `0.4.17` to `0.5.1` 📜 [GitHub Release Notes](https://github.com/scala-native/scala-native/releases/tag/v0.5.1) - [Version Diff](https://github.com/scala-native/scala-native/compare/v0.4.17...v0.5.1) ## Usage ✅ **Please merge!** I'll automatically update this...
## About this PR 📦 Updates [org.typelevel:sbt-typelevel](https://github.com/typelevel/sbt-typelevel) from `0.7.0` to `0.7.1` 📜 [GitHub Release Notes](https://github.com/typelevel/sbt-typelevel/releases/tag/v0.7.1) - [Version Diff](https://github.com/typelevel/sbt-typelevel/compare/v0.7.0...v0.7.1) ## Usage ✅ **Please merge!** I'll automatically update this PR to resolve...
## About this PR 📦 Updates [org.scala-sbt:sbt](https://github.com/sbt/sbt) from `1.9.9` to `1.10.0` 📜 [GitHub Release Notes](https://github.com/sbt/sbt/releases/tag/v1.10.0) - [Version Diff](https://github.com/sbt/sbt/compare/v1.9.9...v1.10.0) ## Usage ✅ **Please merge!** I'll automatically update this PR to resolve...
## About this PR 📦 Updates [org.scala-lang:scala-library](https://github.com/scala/scala) from `2.13.12` to `2.13.14` 📜 [GitHub Release Notes](https://github.com/scala/scala/releases/tag/v2.13.14) - [Version Diff](https://github.com/scala/scala/compare/v2.13.12...v2.13.14) ## Usage ✅ **Please merge!** I'll automatically update this PR to resolve...
## About this PR 📦 Updates [ch.epfl.scala:sbt-scalafix](https://github.com/scalacenter/sbt-scalafix) from `0.11.1` to `0.12.1` 📜 [GitHub Release Notes](https://github.com/scalacenter/sbt-scalafix/releases/tag/v0.12.1) - [Version Diff](https://github.com/scalacenter/sbt-scalafix/compare/v0.11.1...v0.12.1) ## Usage ✅ **Please merge!** I'll automatically update this PR to resolve...
A queued task to a dispatcher cannot be canceled: ```scala import cats.effect.std.Dispatcher import cats.effect.unsafe.implicits.global import cats.effect.IO import scala.concurrent.Await import scala.concurrent.duration.Duration val (dispatcher, shutDownDispatcher) = Dispatcher.sequential[IO].allocated.unsafeRunSync() dispatcher.unsafeToFuture(IO.never) val cancel = dispatcher.unsafeRunCancelable(IO.unit)...
Fixes #4095.
Parts of the example code from https://typelevel.org/cats-effect/docs/core/test-runtime do not compile (h/t @lbialy).
Follow-up to #1393. I think users will likely want to create fiber locals for an abstract effect. We can surely create them in IO and other effects that have this...