Bumpting to Scala 2.10.0-SNAPSHOT
This commit is contained in:
parent
6e134ede21
commit
5a81ac3ba5
3 changed files with 7 additions and 16 deletions
|
|
@ -5,7 +5,7 @@
|
|||
package akka.dispatch
|
||||
|
||||
import java.util.Collection
|
||||
import scala.concurrent.{ Awaitable, BlockContext }
|
||||
import scala.concurrent.{ Awaitable, BlockContext, CanAwait }
|
||||
import scala.concurrent.util.Duration
|
||||
import scala.concurrent.forkjoin._
|
||||
import java.util.concurrent.{
|
||||
|
|
@ -159,13 +159,11 @@ object MonitorableThreadFactory {
|
|||
new Thread.UncaughtExceptionHandler() { def uncaughtException(thread: Thread, cause: Throwable) = () }
|
||||
|
||||
private[akka] class AkkaForkJoinWorkerThread(_pool: ForkJoinPool) extends ForkJoinWorkerThread(_pool) with BlockContext {
|
||||
override def internalBlockingCall[T](awaitable: Awaitable[T], atMost: Duration): T = {
|
||||
override def blockOn[T](thunk: ⇒ T)(implicit permission: CanAwait): T = {
|
||||
val result = new AtomicReference[Option[T]](None)
|
||||
ForkJoinPool.managedBlock(new ForkJoinPool.ManagedBlocker {
|
||||
def block(): Boolean = {
|
||||
result.set(Some(awaitable.result(atMost)(scala.concurrent.impl.InternalFutureUtil.canAwaitEvidence)))
|
||||
// FIXME replace with
|
||||
//result.set(Some(BlockContext.DefaultBlockContext.internalBlockingCall(awaitable, atMost)))
|
||||
result.set(Some(thunk))
|
||||
true
|
||||
}
|
||||
def isReleasable = result.get.isDefined
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
package scala.concurrent.impl
|
||||
|
||||
import scala.concurrent.ExecutionContext
|
||||
|
||||
object InternalFutureUtil {
|
||||
@inline final def canAwaitEvidence = scala.concurrent.Await.canAwaitEvidence
|
||||
}
|
||||
|
|
@ -25,12 +25,12 @@ object AkkaBuild extends Build {
|
|||
lazy val buildSettings = Seq(
|
||||
organization := "com.typesafe.akka",
|
||||
version := "2.1-SNAPSHOT",
|
||||
scalaVersion := desiredScalaVersion
|
||||
/*scalaVersion := "2.10.0-SNAPSHOT",
|
||||
//scalaVersion := desiredScalaVersion
|
||||
scalaVersion := "2.10.0-SNAPSHOT",
|
||||
scalaVersion in update <<= (scalaVersion) apply {
|
||||
case "2.10.0-SNAPSHOT" => desiredScalaVersion
|
||||
case x => x
|
||||
}*/
|
||||
}
|
||||
)
|
||||
|
||||
lazy val akka = Project(
|
||||
|
|
@ -47,7 +47,7 @@ object AkkaBuild extends Build {
|
|||
"""|import akka.actor._
|
||||
|import akka.dispatch._
|
||||
|import com.typesafe.config.ConfigFactory
|
||||
|import akka.util.duration._
|
||||
|import scala.concurrent.util.duration._
|
||||
|import akka.util.Timeout
|
||||
|val config = ConfigFactory.parseString("akka.stdout-loglevel=INFO,akka.loglevel=DEBUG")
|
||||
|val remoteConfig = ConfigFactory.parseString("akka.remote.netty{port=0,use-dispatcher-for-io=akka.actor.default-dispatcher,execution-pool-size=0},akka.actor.provider=RemoteActorRefProvider").withFallback(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue