Allow different types of mailboxes on the same dispatcher. See #2687
This commit is contained in:
parent
c86cc0b8f7
commit
c3eed374f1
32 changed files with 735 additions and 74 deletions
|
|
@ -129,6 +129,7 @@ object CallingThreadDispatcher {
|
|||
class CallingThreadDispatcher(
|
||||
_prerequisites: DispatcherPrerequisites,
|
||||
val mailboxType: MailboxType,
|
||||
val mailboxTypeConfigured: Boolean,
|
||||
val name: String = "calling-thread") extends MessageDispatcher(_prerequisites) {
|
||||
import CallingThreadDispatcher._
|
||||
|
||||
|
|
@ -136,7 +137,8 @@ class CallingThreadDispatcher(
|
|||
|
||||
override def id: String = Id
|
||||
|
||||
protected[akka] override def createMailbox(actor: akka.actor.Cell) = new CallingThreadMailbox(actor, mailboxType)
|
||||
protected[akka] override def createMailbox(actor: akka.actor.Cell) =
|
||||
new CallingThreadMailbox(actor, getMailboxType(actor, mailboxType, mailboxTypeConfigured))
|
||||
|
||||
protected[akka] override def shutdown() {}
|
||||
|
||||
|
|
@ -302,7 +304,7 @@ class CallingThreadDispatcher(
|
|||
class CallingThreadDispatcherConfigurator(config: Config, prerequisites: DispatcherPrerequisites)
|
||||
extends MessageDispatcherConfigurator(config, prerequisites) {
|
||||
|
||||
private val instance = new CallingThreadDispatcher(prerequisites, mailboxType())
|
||||
private val instance = new CallingThreadDispatcher(prerequisites, mailboxType(), mailBoxTypeConfigured)
|
||||
|
||||
override def dispatcher(): MessageDispatcher = instance
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue