A straightforward implementation of the Agent concurrency model for Scala, inspired by agents in Clojure.
Essentially, an agent wraps a shared mutable state and hides it behind a message-passing interface.
Agents accept messages and process them on behalf of the wrapped state. Typically agents accept functions / commands as messages and ensure the submitted commands are executed against the internal agent's state in a thread-safe manner (sequentially). The submitted functions / commands take the internal state as a parameter and their output becomes the new internal state value.
The code that is submitted to an agent doesn't need to pay attention to threading or synchronization, the agent will provide such guarantees by itself.
Commercial Use
Modify
Distribute
Place Warranty
Sub-License
Private Use
Use Patent Claims
Hold Liable
Use Trademarks
Include Copyright
State Changes
Include License
Include Notice
These details are provided for information only. No information here is legal advice and should not be used as such.
30 Day SummaryApr 1 2024 — May 1 2024
|
12 Month SummaryMay 1 2023 — May 1 2024
|