MasseGuillaume / ScalaKata2

Interactive Playground
https://scastie.scala-lang.org/
98 stars 13 forks source link

Mapping over futures times out #41

Closed raboof closed 6 years ago

raboof commented 7 years ago

I was surprised in the following snippet the future timed out for me:

import com.scalakata._

import scala.concurrent._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global

@instrument class Playground {
  val f = Future.successful(42)

  val mapped = f.map {
    case 33 => "asdf"
    case 42 => "fdsa"
  }

  Await.result(mapped, 4 seconds)
}
MasseGuillaume commented 7 years ago

hum I'm not sure what's the issue.