diff options
| author | Matthias Radestock <matthias@lshift.net> | 2009-01-07 16:41:08 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2009-01-07 16:41:08 +0000 |
| commit | 25865591a2ced2379a4acd605d3c7455334d8bd9 (patch) | |
| tree | 5c323601e2e6972db50dd8857c9827310bdfdfaf | |
| parent | 15524e75a4582713b61f77d21295f1f223525ebd (diff) | |
| download | rabbitmq-server-git-25865591a2ced2379a4acd605d3c7455334d8bd9.tar.gz | |
order-preserving cast
| -rw-r--r-- | src/gen_server2.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gen_server2.erl b/src/gen_server2.erl index ef14813fef..11bb66d743 100644 --- a/src/gen_server2.erl +++ b/src/gen_server2.erl @@ -3,7 +3,6 @@ %% %% 1) the module name is gen_server2 %% -%% %% 2) more efficient handling of selective receives in callbacks %% gen_server2 processes drain their message queue into an internal %% buffer before invoking any callback module functions. Messages are @@ -13,6 +12,10 @@ %% As a result of the draining, any selective receive invoked inside a %% callback is less likely to have to scan a large message queue. %% +%% 3) gen_server2:cast is guaranteed to be order-preserving +%% The original code could reorder messages when communicating with a +%% process on a remote node that was not currently connected. +%% %% All modifications are (C) 2009 LShift Ltd. %% ``The contents of this file are subject to the Erlang Public License, @@ -360,12 +363,7 @@ process_msg(Parent, Name, State, Mod, Time, Queue, Debug, Msg) -> %%% Send/recive functions %%% --------------------------------------------------- do_send(Dest, Msg) -> - case catch erlang:send(Dest, Msg, [noconnect]) of - noconnect -> - spawn(erlang, send, [Dest,Msg]); - Other -> - Other - end. + catch erlang:send(Dest, Msg). do_multi_call(Nodes, Name, Req, infinity) -> Tag = make_ref(), |
