Skip to content

Commit

Permalink
changed receivers from var to val
Browse files Browse the repository at this point in the history
  • Loading branch information
agsachin committed Feb 8, 2016
1 parent 8d579f1 commit 06273fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ case class UnsubscribeReceiver(receiverActor: ActorRef)
class FeederActor extends Actor {

val rand = new Random()
var receivers: ArrayBuffer[ActorRef] = new ArrayBuffer[ActorRef]()
val receivers = new ArrayBuffer[ActorRef]()

val strings: Array[String] = Array("words ", "may ", "count ")

Expand Down Expand Up @@ -67,7 +67,7 @@ class FeederActor extends Actor {

case UnsubscribeReceiver(receiverActor: ActorRef) =>
println("received unsubscribe from %s".format(receiverActor.toString))
receivers = receivers.dropWhile(x => x eq receiverActor)
receivers.dropWhile(x => x eq receiverActor)
}
}

Expand Down

0 comments on commit 06273fc

Please sign in to comment.