Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Standard lib or Akka for Scala.2.10.1?

I am going to use Futures and Promises from scala.concurrent package in Scala 2.10.1. Should I use Akka instead ?

like image 237
Michael Avatar asked May 12 '13 14:05

Michael


1 Answers

Akka futures and promises were moved into Scala standard library in 2.10 so there is no difference. It's not that you're using the standard scala classes - the old scala classes no longer exist and have been replaced by akka's.

Use akka actors as scala ones are deprecated in scala 2.11

See akka 2.0 to 2.1 migration for details of what is in the standard scala library now. http://doc.akka.io/docs/akka/2.1.2/project/migration-guide-2.0.x-2.1.x.html

Search  Replace with
akka.dispatch.Await scala.concurrent.Await
akka.dispatch.Future    scala.concurrent.Future
akka.dispatch.Promise   scala.concurrent.Promise
akka.dispatch.ExecutionContext  scala.concurrent.ExecutionContext
akka.util.Duration  scala.concurrent.duration.Duration
akka.util.duration  scala.concurrent.duration
akka.util.Deadline  scala.concurrent.duration.Deadline
akka.util.NonFatal  scala.util.control.NonFatal
akka.japi.Util.manifest akka.japi.Util.classTag
like image 54
JasonG Avatar answered Sep 21 '22 21:09

JasonG