You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/09/25 18:38:24 UTC

[GitHub] bwmcadams opened a new pull request #2802: Akka Usage Cleanup for Actor State safety

bwmcadams opened a new pull request #2802: Akka Usage Cleanup for Actor State safety
URL: https://github.com/apache/incubator-openwhisk/pull/2802
 
 
   Some suggested cleanups of Akka Actors to improve the safety of Actors' internal state. Should make the actor usage safer and be more in line with best practice.
   
   Specifically, the use of immutable collections stored in mutable `var`s is safer than immutable `val`s with mutable collections. With an immutable variable (`val`) pointing to a mutable object (such as a collection, e.g., `Vector` or `Map`), should the variable be closed over or sent in a message accidentally, the Actor's internal state could be inadvertently mutated. With a *mutable* variable (`var`) pointing at an immutable object (collection, etc.) should this state accidentally leak in any fashion, it won't be changeable from the outside. 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services