4 ms·
I'm not sure what you mean by side-effect-free programming on an actor-based architecture. The whole point of actors is to contain side effects, not eliminate t
by yummyfajitas 13y ago
I'm not sure what you mean by side-effect-free programming on an actor-based architecture. The whole point of actors is to contain side effects, not eliminate them.
Erlang is certainly not lock free - I'll use a Scala/Akka example since I know it better than Erlang:
class DiningPhilosopher(leftForkHolder: Actor, rightForkHolder: Actor) extends Actor {
leftForkHolder ! ForkRequest
def receive = {
case ForkFromLeft => {rightForkHolder ! ForkRequest; ...}
}
}
That'll deadlock for sure.
I think stream based programming without loops (i.e., the stream processes form a digraph) will generally be lock free.