=act #17341: Revert starvation prone optimization 4e0bd6d

- also adding test to reproduce the problem
(cherry picked from commit 9e115f2)
This commit is contained in:
Endre Sándor Varga 2015-05-07 13:55:17 +02:00
parent 76641d185a
commit 3d5cb2454f
3 changed files with 70 additions and 28 deletions

View file

@ -14,7 +14,6 @@ import akka.event.Logging.Error
import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
import scala.annotation.tailrec
import scala.concurrent.forkjoin.ForkJoinTask
import scala.util.control.NonFatal
import com.typesafe.config.Config
import java.util.concurrent.atomic.AtomicInteger
@ -54,7 +53,7 @@ private[akka] object Mailbox {
* INTERNAL API
*/
private[akka] abstract class Mailbox(val messageQueue: MessageQueue)
extends ForkJoinTask[Unit] with SystemMessageQueue with Runnable {
extends SystemMessageQueue with Runnable {
import Mailbox._
@ -229,21 +228,6 @@ private[akka] abstract class Mailbox(val messageQueue: MessageQueue)
}
}
override final def getRawResult(): Unit = ()
override final def setRawResult(unit: Unit): Unit = ()
final override def exec(): Boolean = try { run(); false } catch {
case ie: InterruptedException
Thread.currentThread.interrupt()
false
case anything: Throwable
val t = Thread.currentThread
t.getUncaughtExceptionHandler match {
case null
case some some.uncaughtException(t, anything)
}
throw anything
}
/**
* Process the messages in the mailbox
*/