summaryrefslogtreecommitdiff
path: root/src/gatherer.erl
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-05-04 17:55:52 +0100
committerMatthias Radestock <matthias@lshift.net>2010-05-04 17:55:52 +0100
commitf78fd8fdf03f7081973bcf39e71276bf48f60a2d (patch)
tree5faa624531a2c5cf702baea5ea630b7c92822276 /src/gatherer.erl
parent9f463b31b70e35f8983181f7ab9f431704fbc9a3 (diff)
downloadrabbitmq-server-git-f78fd8fdf03f7081973bcf39e71276bf48f60a2d.tar.gz
cosmetic
Diffstat (limited to 'src/gatherer.erl')
-rw-r--r--src/gatherer.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gatherer.erl b/src/gatherer.erl
index 8c44388c40..d5b35e9669 100644
--- a/src/gatherer.erl
+++ b/src/gatherer.erl
@@ -98,9 +98,9 @@ handle_call({finished, Token}, _From,
false -> {reply, ok, State1, hibernate}
end;
-handle_call(fetch, From, State =
- #gstate { blocking = Blocking, results = Results,
- waiting_on = Tokens }) ->
+handle_call(fetch, From,
+ State = #gstate { waiting_on = Tokens, results = Results,
+ blocking = Blocking }) ->
case queue:out(Results) of
{empty, _Results} ->
case sets:size(Tokens) of
@@ -117,8 +117,8 @@ handle_call(fetch, From, State =
handle_call(Msg, _From, State) ->
{stop, {unexpected_call, Msg}, State}.
-handle_cast({produce, Result}, State = #gstate { blocking = Blocking,
- results = Results }) ->
+handle_cast({produce, Result},
+ State = #gstate { blocking = Blocking, results = Results }) ->
{noreply, case queue:out(Blocking) of
{empty, _Blocking} ->
State #gstate { results = queue:in(Result, Results) };
@@ -137,6 +137,6 @@ code_change(_OldVsn, State, _Extra) ->
{ok, State}.
terminate(_Reason, State = #gstate { blocking = Blocking } ) ->
- [gen_server2:reply(Blocked, finished)
- || Blocked <- queue:to_list(Blocking) ],
+ [gen_server2:reply(Blocked, finished) ||
+ Blocked <- queue:to_list(Blocking)],
State.