summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-10-01 22:15:15 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2011-10-01 22:15:15 +0100
commitca592e6a4edbbb028b387943aadc44c22fadb0b8 (patch)
tree56bced1f5e37d52d969664523e607e46612e51e2
parent8091d60485da1f3bf719eec120fab3f136c121f8 (diff)
downloadrabbitmq-server-git-ca592e6a4edbbb028b387943aadc44c22fadb0b8.tar.gz
optimise interaction of limiter with single queues
which is a common case
-rw-r--r--src/rabbit_limiter.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rabbit_limiter.erl b/src/rabbit_limiter.erl
index 24468a01fe..8a08d4b673 100644
--- a/src/rabbit_limiter.erl
+++ b/src/rabbit_limiter.erl
@@ -251,6 +251,7 @@ notify_queues(State = #lim{ch_pid = ChPid, queues = Queues}) ->
end, {[], Queues}, Queues),
case length(QList) of
0 -> ok;
+ 1 -> ok = rabbit_amqqueue:unblock(hd(QList), ChPid); %% common case
L ->
%% We randomly vary the position of queues in the list,
%% thus ensuring that each queue has an equal chance of