1.1 --- a/src/gen_server2.erl Wed Jan 07 13:39:36 2009 +0000
1.2 +++ b/src/gen_server2.erl Fri Feb 06 14:20:11 2009 +0000
1.3 @@ -3,7 +3,6 @@
1.4 %%
1.5 %% 1) the module name is gen_server2
1.6 %%
1.7 -%%
1.8 %% 2) more efficient handling of selective receives in callbacks
1.9 %% gen_server2 processes drain their message queue into an internal
1.10 %% buffer before invoking any callback module functions. Messages are
1.11 @@ -13,6 +12,10 @@
1.12 %% As a result of the draining, any selective receive invoked inside a
1.13 %% callback is less likely to have to scan a large message queue.
1.14 %%
1.15 +%% 3) gen_server2:cast is guaranteed to be order-preserving
1.16 +%% The original code could reorder messages when communicating with a
1.17 +%% process on a remote node that was not currently connected.
1.18 +%%
1.19 %% All modifications are (C) 2009 LShift Ltd.
1.20
1.21 %% ``The contents of this file are subject to the Erlang Public License,
1.22 @@ -360,12 +363,7 @@
1.23 %%% Send/recive functions
1.24 %%% ---------------------------------------------------
1.25 do_send(Dest, Msg) ->
1.26 - case catch erlang:send(Dest, Msg, [noconnect]) of
1.27 - noconnect ->
1.28 - spawn(erlang, send, [Dest,Msg]);
1.29 - Other ->
1.30 - Other
1.31 - end.
1.32 + catch erlang:send(Dest, Msg).
1.33
1.34 do_multi_call(Nodes, Name, Req, infinity) ->
1.35 Tag = make_ref(),