Debugging in an Asynchronous World
Matthias Lang
matthias@REDACTED
Mon Feb 9 10:32:23 CET 2004
Shawn Pearce writes:
> Ulf Wiger <ulf.wiger@REDACTED> wrote:
> > <marc.vanwoerkom@REDACTED> wrote:
> > >I would lvoe to hear an Erlang point of view comment on this article:
> > > Debugging in an Asynchronous World
> > > Michael Donat, Silicon Chalk
Ulf> Well, what they describe is your typical pthreads hell or nightmares
Shawn> [...] The threads were so interrelated that just shifting
Shawn> a few instructions in the critical path would cause the
Shawn> threads to work
Once again, a bunch of problems come back to the design decision
"should data be shared by default?".
I've spent a lot of time in large C++ projects chasing obscure race
conditions. They're almost always caused by data being accessed by
multiple threads in ways people didn't anticipate. Typically, the only
reason that data was shared between threads was that that is the
default.
The most usual Erlang concurrency problem I bump into is unintended
circular dependencies between processes, e.g. one gen-server calls
another gen-server, which in turn calls the first one. This always
results in a deadlock which is (a) easily reproduceable and (b) easy
to understand.
Matthias
More information about the erlang-questions
mailing list