Merge pull request #16634 from dimbleby/stable-priority-mailbox
Introduce stable priority mailboxes.
This commit is contained in:
commit
50d1569f37
8 changed files with 289 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue