Reputation: 27250
Why this does not work?
scala> actor { loop { receive {
| case s:String => s + " :)"
| }}}
res0: scala.actors.Actor = scala.actors.Actor$$anon$1@2d382988
scala> res0 !? "hello"
... and it hangs here ...
Upvotes: 1
Views: 138
Reputation: 1095
Try reacting to the given message:
actor { loop { receive {
case s: String => reply(s + " :)")
}}}
Upvotes: 6