summaryrefslogtreecommitdiff
path: root/src/delegate.erl
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-06-14 19:02:39 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-06-14 19:02:39 +0100
commit36e971a26173b2436f435ce91cf68a642dcaee8c (patch)
treead71d39099ef2240f955ffdcf5f0613a50a996c7 /src/delegate.erl
parente57e0c2b07a0be43bddbbcbd524ca3ad3ca95373 (diff)
parent79f8803b480cab6974c6f212e3644a8f0893596b (diff)
downloadrabbitmq-server-git-36e971a26173b2436f435ce91cf68a642dcaee8c.tar.gz
Merging default into bug 21673
Diffstat (limited to 'src/delegate.erl')
-rw-r--r--src/delegate.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/delegate.erl b/src/delegate.erl
index 98353453ff..8af2812781 100644
--- a/src/delegate.erl
+++ b/src/delegate.erl
@@ -45,8 +45,8 @@
-ifdef(use_specs).
-spec(start_link/1 :: (non_neg_integer()) -> {'ok', pid()}).
--spec(invoke_no_result/2 :: (pid() | [pid()], fun((pid()) -> any())) -> 'ok').
--spec(invoke/2 :: (pid() | [pid()], fun((pid()) -> A)) -> A).
+-spec(invoke_no_result/2 :: (pid() | [pid()], fun ((pid()) -> any())) -> 'ok').
+-spec(invoke/2 :: (pid() | [pid()], fun ((pid()) -> A)) -> A).
-spec(process_count/0 :: () -> non_neg_integer()).
@@ -73,7 +73,7 @@ invoke(Pid, Fun) when is_pid(Pid) ->
invoke(Pids, Fun) when is_list(Pids) ->
lists:foldl(
- fun({Status, Result, Pid}, {Good, Bad}) ->
+ fun ({Status, Result, Pid}, {Good, Bad}) ->
case Status of
ok -> {[{Pid, Result}|Good], Bad};
error -> {Good, [{Pid, Result}|Bad]}
@@ -136,10 +136,10 @@ delegate_per_remote_node(NodePids, Fun, DelegateFun) ->
%% block forever.
[gen_server2:cast(
local_server(Node),
- {thunk, fun() ->
+ {thunk, fun () ->
Self ! {result,
DelegateFun(
- Node, fun() -> safe_invoke(Pids, Fun) end)}
+ Node, fun () -> safe_invoke(Pids, Fun) end)}
end}) || {Node, Pids} <- NodePids],
[receive {result, Result} -> Result end || _ <- NodePids].