Skip to content

Commit

Permalink
Updated example in Scastie
Browse files Browse the repository at this point in the history
  • Loading branch information
devlaam committed Jun 6, 2023
1 parent 618144b commit 9cdd443
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ object MyActor extends AcceptDefine, Stateless :
/* Letter that sends some text */
case class Text(data: String) extends Letter
/* Letter that sends a number */
case object Number(data: Int) extends Letter
case class Number(data: Int) extends Letter
```
You can send a `letter` to actor `receiver` from actor `sender` with `receiver.send(letter,sender)`, or with the
short form `receiver ! letter` from within the `sender`. For example:
Expand All @@ -77,7 +77,8 @@ object Main :
myActor.stop(Actor.Stop.Finish)
ActorGuard.watch(false,1.second,complete)
```
See this [run in Scastie](https://scastie.scala-lang.org/p6332KZjQQihj6JqsU3cMg). Remark: Depending on the release used, there may be syntactical differences.
See this [run in Scastie](https://scastie.scala-lang.org/devlaam/rpMXSz4wTA2hnLG68swyBA/3).
Remark: Depending on the release used, there may be syntactical differences.

### Advanced features
The functionality of actors can be extended with mixins. There are:
Expand Down

0 comments on commit 9cdd443

Please sign in to comment.