3 ms·
stash is not the same as selective receive at all. With selective receive you can do simple, intuitive nested receive blocks (see the Pulsar Clojure examples he
by pron 13y ago
stash is not the same as selective receive at all. With selective receive you can do simple, intuitive nested receive blocks (see the Pulsar Clojure examples here: http://blog.paralleluniverse.co/post/49445260575/quasar-pulsar http://blog.paralleluniverse.co/post/49445260575/quasar-puls... or any Erlang code).
And yes, you can configure Akka for certain types of usage, but it is anything but simple. We value the simplicity and intuitiveness that are at the core of Clojure and Erlang.
- saryant 13y agoI didn't say that stash() is the same, just that it's quite easy to use it to implement selective receive in Akka in combination with hot-swapping an actor's behavior with become/unbecome. We use this pattern quite successfully in our code base.