News for hackers. Stuff that matters.
Re:EventMachine: scalable non-blocking i/o in ruby by viraptor on Monday March 15, 2010 @03:55PM (#1193924)
What always bugged me about Twisted, or similar design is that you have to really flex your brain to get proper error handling (or maybe I'm just not experienced enough with them? :) please correct me if I'm wrong) It seems that you need a lot of shared state to kill some other process that is connected to your action in some way... You need to set a flag that will stop the other code path in some place. Then you need to know how to resolve the conflict (is one process providing resources for the other one? how do you synchronise closing down?)

In Erlang (or a similar multiprocess / actor-based system) you just kill the computation you want to stop. It's up to the killed side (or their supervisor) to know how to handle it - but it doesn't happen during the next computation loop, or when it's convenient - it handles the condition now.

There are no comments on this comment yet.