diff options
author | Patrik Nyblom <[email protected]> | 2010-09-08 15:16:19 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-09-13 10:51:53 +0200 |
commit | 5aa2a77fa90f791e0aec2af9de746a7af6c8d147 (patch) | |
tree | 91006df5901cce86ade68c36b4083e80761432a0 /lib/erl_interface/test/ei_connect_SUITE.erl | |
parent | 1d7578e4ab1226eb969723102bc20606051d46b1 (diff) | |
download | otp-5aa2a77fa90f791e0aec2af9de746a7af6c8d147.tar.gz otp-5aa2a77fa90f791e0aec2af9de746a7af6c8d147.tar.bz2 otp-5aa2a77fa90f791e0aec2af9de746a7af6c8d147.zip |
Make ei_threaded_send synchronized
Diffstat (limited to 'lib/erl_interface/test/ei_connect_SUITE.erl')
-rw-r--r-- | lib/erl_interface/test/ei_connect_SUITE.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/erl_interface/test/ei_connect_SUITE.erl b/lib/erl_interface/test/ei_connect_SUITE.erl index 56f478edad..fe82a73ef9 100644 --- a/lib/erl_interface/test/ei_connect_SUITE.erl +++ b/lib/erl_interface/test/ei_connect_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-2010. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -103,10 +103,12 @@ ei_threaded_send(Config) when is_list(Config) -> ?line Einode = filename:join(?config(data_dir, Config), "einode"), ?line N = 15, ?line Host = atom_to_list(node()), - ?line spawn_link(fun() -> start_einode(Einode, N, Host) end), ?line TestServerPid = self(), ?line [ spawn_link(fun() -> rec_einode(I, TestServerPid) end) || I <- lists:seq(0, N-1) ], + ?line [ receive {I,registered} -> ok end + || I <- lists:seq(0, N-1) ], + ?line spawn_link(fun() -> start_einode(Einode, N, Host) end), ?line [ receive I -> ok end || I <- lists:seq(0, N-1) ], ok. @@ -114,6 +116,7 @@ ei_threaded_send(Config) when is_list(Config) -> rec_einode(N, TestServerPid) -> ?line Regname = list_to_atom("mth"++integer_to_list(N)), ?line register(Regname, self()), + ?line TestServerPid ! {N, registered}, ?line io:format("~p waiting~n", [Regname]), ?line receive X -> |