Merge pull request #16634 from dimbleby/stable-priority-mailbox

Introduce stable priority mailboxes.
This commit is contained in:
Roland Kuhn 2015-01-28 15:10:24 +01:00
commit 50d1569f37
8 changed files with 289 additions and 13 deletions

View file

@ -187,13 +187,13 @@ object DispatcherDocSpec {
//#prio-mailbox
import akka.dispatch.PriorityGenerator
import akka.dispatch.UnboundedPriorityMailbox
import akka.dispatch.UnboundedStablePriorityMailbox
import com.typesafe.config.Config
// We inherit, in this case, from UnboundedPriorityMailbox
// We inherit, in this case, from UnboundedStablePriorityMailbox
// and seed it with the priority generator
class MyPrioMailbox(settings: ActorSystem.Settings, config: Config)
extends UnboundedPriorityMailbox(
extends UnboundedStablePriorityMailbox(
// Create a new PriorityGenerator, lower prio means more important
PriorityGenerator {
// 'highpriority messages should be treated first if possible