I currently use an akka Actor system in my Scala code. I have a parent actor and a child actor. What i want to do is initiate a List at the parent actor and let the child actor:
i)Generate new elements and send them to parent actor who will attach them to the list. ii)Have access at the list elements at anytime.
How can i achieve the second(ii) part?
Well, I managed to find a solution.
If you create a variable inside the parent Actor and pass it as a construction parameter to the child Actor , every alteration in this variable is visible if you do not replace it. I will explain with a correct example following a false example.
}
}