make sure lock is aquired when accessing shutdownSchedule

This commit is contained in:
Derek Williams 2011-04-28 07:47:51 -06:00
parent 485013a353
commit c61f1a42dc

View file

@ -95,7 +95,7 @@ trait MessageDispatcher {
}
private val futureCleanup: () => Unit = { () =>
if (futures.decrementAndGet() == 0 && uuids.isEmpty) {
if (futures.decrementAndGet() == 0) guard withGuard { if (uuids.isEmpty) {
shutdownSchedule match {
case UNSCHEDULED =>
shutdownSchedule = SCHEDULED
@ -104,7 +104,7 @@ trait MessageDispatcher {
shutdownSchedule = RESCHEDULED
case RESCHEDULED => //Already marked for reschedule
}
}
}}
}
private[akka] def register(actorRef: ActorRef) {