diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-10-25 16:35:22 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-10-25 16:35:22 +0100 |
commit | dbea323eaf57a5a4408e1fb237e6e381d3df79bd (patch) | |
tree | e5140782d41fe2892d72dc29d0333f810ca4fce3 /src/delegate_sup.erl | |
parent | 2857a50b6c63d1187dad2959c322e05958226336 (diff) | |
download | rabbitmq-server-dbea323eaf57a5a4408e1fb237e6e381d3df79bd.tar.gz |
Use two pools of delegates, one for each of outgoing and incoming messages. Prevents deadlocks.bug23429
Diffstat (limited to 'src/delegate_sup.erl')
-rw-r--r-- | src/delegate_sup.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/delegate_sup.erl b/src/delegate_sup.erl index ff303ee2..544546f1 100644 --- a/src/delegate_sup.erl +++ b/src/delegate_sup.erl @@ -55,9 +55,11 @@ start_link() -> %%---------------------------------------------------------------------------- init(_Args) -> - {ok, {{one_for_one, 10, 10}, - [{Hash, {delegate, start_link, [Hash]}, - transient, 16#ffffffff, worker, [delegate]} || - Hash <- lists:seq(0, delegate:process_count() - 1)]}}. + {ok, {{one_for_one, 10, 10}, specs(incoming) ++ specs(outgoing)}}. + +specs(Prefix) -> + [{{Prefix, Hash}, {delegate, start_link, [Prefix, Hash]}, + transient, 16#ffffffff, worker, [delegate]} || + Hash <- lists:seq(0, delegate:process_count() - 1)]. %%---------------------------------------------------------------------------- |