[erlang-questions] Programming question

Sean Hinde sean.hinde@REDACTED
Wed Jan 24 15:20:07 CET 2007


On 24 Jan 2007, at 14:00, Javier París wrote:

> El Miércoles, 24 de Enero de 2007 13:15, Sean Hinde escribió:
>> Hi,
>>
>> A quick question for Erlang gurus out there.
>>
>> I have two processes A and B. B spends most of its life in a series
>> of gen_server calls towards A:
>>
>> loopB(PidA, S) ->
>>       Res = gen_server:call(PidA, {op, stuff}),
>>       S1 = process(Res, S),
>>       loopB(PidA, S1).
>>
>> The question is how do I set things up so that if A dies B is killed?
>
> Just link them:
>
> In B, before calling loopB:

Please try it. What happens if A dies while B is waiting for the  
result of the call?

Sean







More information about the erlang-questions mailing list