UnboundedBlockingQueue: Adjust segment size
authorMaged Michael <magedmichael@fb.com>
Tue, 9 Jan 2018 00:29:24 +0000 (16:29 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 9 Jan 2018 00:35:20 +0000 (16:35 -0800)
Summary: Adjust the segment size of the `UnboundedQueue` to 64 instead of 256, a size more suitable for CPUThreadPoolExecutor::CPUTask elements.

Reviewed By: djwatson

Differential Revision: D6665918

fbshipit-source-id: c34c4fa936ee5c6d6a3dd4489129c936369f3980

folly/executors/task_queue/UnboundedBlockingQueue.h

index cfab654..c6a5359 100644 (file)
@@ -46,7 +46,7 @@ class UnboundedBlockingQueue : public BlockingQueue<T> {
 
  private:
   LifoSem sem_;
-  UMPMCQueue<T, false> queue_;
+  UMPMCQueue<T, false, 6> queue_;
 };
 
 } // namespace folly