Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object Main {
- private def runWithVanilla() = {
- import scala.concurrent.ExecutionContext.Implicits.global
- val f = Future(throw new OutOfMemoryError("foop"))
- Await.result(f,Duration.Inf)
- println("vanilla future completed? " + f.isCompleted)
- }
- private def runWithAkka() = {
- val system = ActorSystem("mySystem")
- import system.dispatcher
- val f = Future(throw new OutOfMemoryError("foop"))
- Await.result(f,Duration.Inf)
- println("akka dispatched future completed? " + f.isCompleted)
- }
- def main(args: Array[String]): Unit = {
- // runWithVanilla()
- runWithAkka()
- }
- }
Add Comment
Please, Sign In to add comment