blob: 8466004ce4a96ce875ec68c166741bdaa3667536 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
%% This tests that the race condition detection between whereis/register
%% is robust even when the functions are called with different variables
%% as arguments.
-module(whereis_diff_vars_no_race).
-export([test/3]).
test(AnAtom, AnotherAtom, Pid) ->
{aux(AnAtom, Pid), aux(AnotherAtom, Pid)}.
aux(Atom, Pid) ->
register(Atom, Pid),
whereis(Atom).
|