Wed Aug 4 21:35:03 CEST 1999
I'm wondering if someone can help me with a pattern for avoiding a
deadlock. Fundamentally, my problem is this:
I have two gen_server processes, A and B. A wants to make a call on
B for the sake of the side-effects. These side-effects involve making
calls to A.
So, it seems to me that if A makes a gen_server:call to B, then when B
does the same back to A, it will get a cycle in the call graph and
deadlock. Now, it might seem that it's the inappropriate use of
side-effects that's the problem, and that B should just return a value
for A to use, however I'm trying to follow an explicit mapping which
has things this way. Specifically, a corba Portable Object Adapter
calling an AdapterActivator.
Any help would be appreciated. Infact, I'd love to some general
information about managing things with Erlang's concurrency model, I'm
sure there are oodles of useful patterns - pointers would be great!
More information about the erlang-questions