Message-ID: <1607101312.23113.1417037944433.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_23112_1410839177.1417037944432" ------=_Part_23112_1410839177.1417037944432 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The Agent is a special-purpose thread-safe non-blocking implemen= tation inspired by Agents in Clojure.
Agents safe-guard mutable values by allowing only a single agent=
-managed thread to make modifications to them. The mutable values =
are not directly accessible from outside, but instead
Agents are asynchronous active objects that accept code (functions) as m= essages. After reception the function is run against the internal state of = the Agent and the return value of the function is considered to be the new = internal state of the Agent.
To wrap integers, we can certainly use AtomicXXX types of the Java platf= orm. When the state or the update algorithms become more complex we need mo= re support.