Remove procedure syntax (#25362)
This commit is contained in:
parent
50979d599c
commit
5b3b191bac
180 changed files with 403 additions and 403 deletions
|
|
@ -137,7 +137,7 @@ class CallingThreadDispatcher(_configurator: MessageDispatcherConfigurator) exte
|
|||
protected[akka] override def createMailbox(actor: akka.actor.Cell, mailboxType: MailboxType) =
|
||||
new CallingThreadMailbox(actor, mailboxType)
|
||||
|
||||
protected[akka] override def shutdown() {}
|
||||
protected[akka] override def shutdown(): Unit = {}
|
||||
|
||||
protected[akka] override def throughput = 0
|
||||
protected[akka] override def throughputDeadlineTime = Duration.Zero
|
||||
|
|
@ -164,14 +164,14 @@ class CallingThreadDispatcher(_configurator: MessageDispatcherConfigurator) exte
|
|||
mbox foreach CallingThreadDispatcherQueues(actor.system).unregisterQueues
|
||||
}
|
||||
|
||||
protected[akka] override def suspend(actor: ActorCell) {
|
||||
protected[akka] override def suspend(actor: ActorCell): Unit = {
|
||||
actor.mailbox match {
|
||||
case m: CallingThreadMailbox ⇒ { m.suspendSwitch.switchOn; m.suspend() }
|
||||
case m ⇒ m.systemEnqueue(actor.self, Suspend())
|
||||
}
|
||||
}
|
||||
|
||||
protected[akka] override def resume(actor: ActorCell) {
|
||||
protected[akka] override def resume(actor: ActorCell): Unit = {
|
||||
actor.mailbox match {
|
||||
case mbox: CallingThreadMailbox ⇒
|
||||
val queue = mbox.queue
|
||||
|
|
@ -185,7 +185,7 @@ class CallingThreadDispatcher(_configurator: MessageDispatcherConfigurator) exte
|
|||
}
|
||||
}
|
||||
|
||||
protected[akka] override def systemDispatch(receiver: ActorCell, message: SystemMessage) {
|
||||
protected[akka] override def systemDispatch(receiver: ActorCell, message: SystemMessage): Unit = {
|
||||
receiver.mailbox match {
|
||||
case mbox: CallingThreadMailbox ⇒
|
||||
mbox.systemEnqueue(receiver.self, message)
|
||||
|
|
@ -194,7 +194,7 @@ class CallingThreadDispatcher(_configurator: MessageDispatcherConfigurator) exte
|
|||
}
|
||||
}
|
||||
|
||||
protected[akka] override def dispatch(receiver: ActorCell, handle: Envelope) {
|
||||
protected[akka] override def dispatch(receiver: ActorCell, handle: Envelope): Unit = {
|
||||
receiver.mailbox match {
|
||||
case mbox: CallingThreadMailbox ⇒
|
||||
val queue = mbox.queue
|
||||
|
|
@ -210,7 +210,7 @@ class CallingThreadDispatcher(_configurator: MessageDispatcherConfigurator) exte
|
|||
}
|
||||
}
|
||||
|
||||
protected[akka] override def executeTask(invocation: TaskInvocation) { invocation.run }
|
||||
protected[akka] override def executeTask(invocation: TaskInvocation): Unit = { invocation.run }
|
||||
|
||||
/*
|
||||
* This method must be called with this thread's queue.
|
||||
|
|
@ -220,7 +220,7 @@ class CallingThreadDispatcher(_configurator: MessageDispatcherConfigurator) exte
|
|||
* it is suspendSwitch and resumed.
|
||||
*/
|
||||
@tailrec
|
||||
private def runQueue(mbox: CallingThreadMailbox, queue: MessageQueue, interruptedEx: InterruptedException = null) {
|
||||
private def runQueue(mbox: CallingThreadMailbox, queue: MessageQueue, interruptedEx: InterruptedException = null): Unit = {
|
||||
def checkThreadInterruption(intEx: InterruptedException): InterruptedException = {
|
||||
if (Thread.interrupted()) { // clear interrupted flag before we continue, exception will be thrown later
|
||||
val ie = new InterruptedException("Interrupted during message processing")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue