aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/race_tests_SUITE_data/src/whereis_intra_inter_module4/whereis_intra_inter_module8.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-03-17 16:02:02 +0100
committerMicael Karlberg <[email protected]>2011-03-17 16:02:02 +0100
commit5cba72579ad75f85797aae14fde94fca6acf6406 (patch)
treedcced80b5816741682d10f77d37e5a059c054e42 /lib/dialyzer/test/race_tests_SUITE_data/src/whereis_intra_inter_module4/whereis_intra_inter_module8.erl
parentc959a0cd5392d356e8bda8d7eb9d0e71a88360b3 (diff)
parentf861b4fdb3fd39e35f2951c53a73b30a98c7f973 (diff)
downloadotp-5cba72579ad75f85797aae14fde94fca6acf6406.tar.gz
otp-5cba72579ad75f85797aae14fde94fca6acf6406.tar.bz2
otp-5cba72579ad75f85797aae14fde94fca6acf6406.zip
Merge branch 'dev' into bmk/inets/httpc/support_upload_body_streaming/OTP-9094
Conflicts: lib/inets/doc/src/notes.xml Fixed release notes after merge.
Diffstat (limited to 'lib/dialyzer/test/race_tests_SUITE_data/src/whereis_intra_inter_module4/whereis_intra_inter_module8.erl')
-rw-r--r--lib/dialyzer/test/race_tests_SUITE_data/src/whereis_intra_inter_module4/whereis_intra_inter_module8.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/dialyzer/test/race_tests_SUITE_data/src/whereis_intra_inter_module4/whereis_intra_inter_module8.erl b/lib/dialyzer/test/race_tests_SUITE_data/src/whereis_intra_inter_module4/whereis_intra_inter_module8.erl
new file mode 100644
index 0000000000..581817308b
--- /dev/null
+++ b/lib/dialyzer/test/race_tests_SUITE_data/src/whereis_intra_inter_module4/whereis_intra_inter_module8.erl
@@ -0,0 +1,13 @@
+%% This tests that the race condition detection between whereis/register
+%% is robust w.r.t. having the calls in separate functions and modules.
+
+-module(whereis_intra_inter_module8).
+-export([continue/2]).
+
+continue(AnAtom, Fun) ->
+ case whereis(AnAtom) of
+ undefined ->
+ Pid = spawn(Fun);
+ P when is_pid(P) ->
+ P
+ end.