Removing @inline from Actor.sender since it cannot safely be inlined anyway. Also, changing the ordering of the checks for receiveTimeout_= so it passed -optimize compilation without whining
This commit is contained in:
parent
36e85e9f23
commit
7d9a124b64
2 changed files with 5 additions and 4 deletions
|
|
@ -266,7 +266,6 @@ trait Actor {
|
|||
* The reference sender Actor of the last received message.
|
||||
* Is defined if the message was sent from another Actor, else None.
|
||||
*/
|
||||
@inline
|
||||
final def sender: ActorRef = context.sender
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -85,10 +85,12 @@ private[akka] class ActorCell(
|
|||
|
||||
final def provider = system.provider
|
||||
|
||||
def receiveTimeout: Option[Long] = if (receiveTimeoutData._1 > 0) Some(receiveTimeoutData._1) else None
|
||||
override def receiveTimeout: Option[Long] = if (receiveTimeoutData._1 > 0) Some(receiveTimeoutData._1) else None
|
||||
|
||||
def receiveTimeout_=(timeout: Option[Long]): Unit =
|
||||
receiveTimeoutData = (if (timeout.isEmpty || timeout.get < 1) -1 else timeout.get, receiveTimeoutData._2)
|
||||
override def receiveTimeout_=(timeout: Option[Long]): Unit = {
|
||||
val timeoutMs = if (timeout.isDefined && timeout.get > 0) timeout.get else -1
|
||||
receiveTimeoutData = (timeoutMs, receiveTimeoutData._2)
|
||||
}
|
||||
|
||||
var receiveTimeoutData: (Long, Cancellable) =
|
||||
if (_receiveTimeout.isDefined) (_receiveTimeout.get, emptyCancellable) else emptyReceiveTimeoutData
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue