3 ms·
I mean, that's a pretty standard actor pattern.. https://github.com/foobatman/producer-consumer-akka-actor/tree/master/src/main/scala/com/intution/ai/actor htt
by mruts 8y ago
I mean, that's a pretty standard actor pattern..
https://github.com/foobatman/producer-consumer-akka-actor/tree/master/src/main/scala/com/intution/ai/actor https://github.com/foobatman/producer-consumer-akka-actor/tr...
There are many more examples out there. Anything that a multi-threaded program can do, an actor can do..
I just think that actors are inherently more complex than threads for simple problems. For complex problems, I think actor are probably a better choice.
A good example of a simple program is managing multiple TCP connections. At least in my (somewhat limited) experience with actors, polling TCP file descriptors is easier to manage creating an actor for each one.