Commit 6d4a104
authored
Perf[bmqc]: stop MQTP queues in parallel (bloomberg#1557)
Split the serial stop loop in `MultiQueueThreadPool::stop()` into two phases so all queues drain concurrently rather than sequentially. The first loop signals every queue (pushBack NULL, disablePushBack), the second waits on each queue's `d_finished` semaphore. This is safe because each queue's shutdown is self-contained: its own semaphore, ref count, and backing SingleConsumerQueue with no cross-queue state. The ref count nets to zero per queue (+1 enqueue monitor, -1 release initial reference), so finish order is irrelevant.
Signed-off-by: Srinath Satuluri <satulurisrinath@gmail.com>1 parent 70f0a9b commit 6d4a104
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
| 868 | + | |
868 | 869 | | |
869 | 870 | | |
870 | 871 | | |
| |||
882 | 883 | | |
883 | 884 | | |
884 | 885 | | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
885 | 891 | | |
886 | 892 | | |
887 | 893 | | |
| |||
0 commit comments