1
%% This tests the presence of possible races due to a register/whereis
2
%% combination in an indirectly recursive function.
4
-module(whereis_rec_function6).
7
start(AnAtom, NextAtom, Fun, Id) ->
9
undefined -> register(start, Id);
10
_ -> register(AnAtom, Id)
12
case whereis(NextAtom) of
15
case Pid =:= self() of
17
false -> continue(NextAtom, mod:next(), Pid, Id)
23
continue(Atom, NextAtom, Fun, Id) ->
24
start(Atom, NextAtom, Fun, Id).