Skip to content

IO.syncStep leads to double execution #2858

@t3hnar

Description

@t3hnar

Hey guys,
I found which seems to me a critical bug during migration of codebase from ce2 to ce3

The code below prints hello twice, I would expect hello to be printed once.

    IO
      .apply { println("hello") }
      .flatMap { _ => IO.cede }
      .as(Succeeded)
      .syncStep
      .unsafeRunSync() match {
      case Right(a) => Future.successful(a)
      case Left(a)  => a.unsafeToFuture()
    }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions