aboutsummaryrefslogblamecommitdiffstats
path: root/lib/dialyzer/test/race_SUITE_data/src/whereis_control_flow6.erl
blob: 03c5095a503d581285b2993eb0f1fe1b8dc776f6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                        
%% This tests the presence of possible races due to a whereis/unregister
%% combination. It takes into account control flow that might exist.

-module(whereis_control_flow6).
-export([start/0]).

start() ->
  case whereis(kostis) of
    undefined -> ok;
    P when is_pid(P) ->
      unregister(kostis)
  end.