1
%% This tests the presence of possible races due to a register/whereis
2
%% combination in a recursive function.
4
-module(whereis_rec_function2).
8
start(undefined, second, mod:f(), self()).
10
start(AnAtom, NextAtom, Fun, Id) ->
12
undefined -> register(start, Id);
13
_ -> register(AnAtom, Id)
15
case whereis(NextAtom) of
18
case Pid =:= self() of
20
false -> start(NextAtom, mod:next(), Pid, Id)