Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass IO-specialized Deferred for now #3365

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/cats/effect/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ object IO extends IOCompanionPlatform with IOLowPriorityImplicits {

def ref[A](a: A): IO[Ref[IO, A]] = IO(Ref.unsafe(a))

def deferred[A]: IO[Deferred[IO, A]] = IO(new IODeferred[A])
def deferred[A]: IO[Deferred[IO, A]] = IO(Deferred.unsafe)

def bracketFull[A, B](acquire: Poll[IO] => IO[A])(use: A => IO[B])(
release: (A, OutcomeIO[B]) => IO[Unit]): IO[B] =
Expand Down
2 changes: 1 addition & 1 deletion tests/shared/src/test/scala/cats/effect/IOSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ class IOSpec extends BaseSpec with Discipline with IOPlatformSpecification {
}

"produce a specialized version of Deferred" in real {
IO.deferred[Unit].flatMap(d => IO(d must haveClass[IODeferred[_]]))
IO.deferred[Unit].flatMap(d => IO((d must haveClass[IODeferred[_]]).pendingUntilFixed))
}

platformSpecs
Expand Down