immutables and actors

2 views
Skip to first unread message

William la Forge

unread,
Mar 10, 2015, 8:59:56 PM3/10/15
to AgileWikiDevelopers
Immutables are great in a multi-threading environment because their contents can not be changed. Rather, an updated immutable is a new object which may share much of its content with earlier versions of same.

Immutables work great with actors, too. An actor would hold a reference to an immutable and provide unrestricted access to the current immutable. But updates to that reference would be performed only by the actor itself. Alternately, updates to the reference could be done under a lock. But then you are back to dealing with things like deadlocks.

Release 0.2.0 was the addition of versioned (mutable) map lists. Version 0.3.0 will be the addition of immutable versioned map lists. This is where the simplicity of the AA Trees used in release 0.2.0 pays off so nicely--it turns out that they are easy to transform int immutalbes.

Bill La Forge CTO

Raoul Duke

unread,
Mar 10, 2015, 9:02:37 PM3/10/15
to AgileWikiDevelopers
yup, good stuff!

likewise, see clojure agents. or, kinda, how in erlang the actor loop is a recursive function.
Reply all
Reply to author
Forward
0 new messages