#2934 - explaining send a bit better in the docs
This commit is contained in:
parent
68f3dd549d
commit
791bbd1565
3 changed files with 10 additions and 11 deletions
|
|
@ -48,10 +48,12 @@ class AgentDocSpec extends AkkaSpec {
|
|||
"send and sendOff" in {
|
||||
val agent = Agent(0)(ExecutionContext.global)
|
||||
//#send
|
||||
// send a value
|
||||
// send a value, enqueues this change
|
||||
// of the value of the Agent
|
||||
agent send 7
|
||||
|
||||
// send a function
|
||||
// send a function, enqueues this change
|
||||
// to the value of the Agent
|
||||
agent send (_ + 1)
|
||||
agent send (_ * 2)
|
||||
//#send
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue