diff options
author | Philip Kuryloski <pkuryloski@pivotal.io> | 2020-03-20 14:00:37 +0100 |
---|---|---|
committer | Philip Kuryloski <pkuryloski@pivotal.io> | 2020-03-20 14:00:37 +0100 |
commit | 01270fd3cdd381d14af7a1861e7f8b839a5d3130 (patch) | |
tree | 1f158f1f9bd32653a752c202e5eefe52552ecbd9 | |
parent | bfdb74cbd867d6e882c4e6fa434793b94c8d229f (diff) | |
download | rabbitmq-server-git-01270fd3cdd381d14af7a1861e7f8b839a5d3130.tar.gz |
Improve worker_pool worker utilization
Make use of the new dispatch_sync function in
https://github.com/rabbitmq/rabbitmq-common/pull/368 to block only when all
workers are busy
-rw-r--r-- | src/rabbit_msg_store.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index 7faa724536..56d65d75e9 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -1801,7 +1801,7 @@ build_index_worker(Gatherer, State = #msstate { dir = Dir }, enqueue_build_index_workers(Gatherer, Left, [], State) -> exit(normal); enqueue_build_index_workers(Gatherer, Left, [File|Files], State) -> - ok = worker_pool:submit( + ok = worker_pool:dispatch_sync( fun () -> link(Gatherer), ok = build_index_worker(Gatherer, State, |