All template params for PriorityMPMCQueue
authorYedidya Feldblum <yfeldblum@fb.com>
Sat, 8 Apr 2017 14:08:01 +0000 (07:08 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 8 Apr 2017 14:21:29 +0000 (07:21 -0700)
Summary:
[Folly] All template params for `PriorityMPMCQueue`.

Mimic the suite of template params of `MPMCQueue`.

Reviewed By: magedm

Differential Revision: D4857179

fbshipit-source-id: 3d441099c46ea1223155bd3f4cc819595814c47b

folly/PriorityMPMCQueue.h

index b1c0a875bfd0d02ab17dbbfd94d84d297c0bef65..fb4e4645228d8ff8985cca87380b1645f79e9922 100644 (file)
@@ -28,7 +28,10 @@ namespace folly {
 /// not implement a blocking interface. For the purposes of this
 /// class, lower number is higher priority
 
 /// not implement a blocking interface. For the purposes of this
 /// class, lower number is higher priority
 
-template <class T>
+template <
+    typename T,
+    template <typename> class Atom = std::atomic,
+    bool Dynamic = false>
 class PriorityMPMCQueue {
  public:
   PriorityMPMCQueue(size_t numPriorities, size_t capacity) {
 class PriorityMPMCQueue {
  public:
   PriorityMPMCQueue(size_t numPriorities, size_t capacity) {
@@ -91,7 +94,7 @@ class PriorityMPMCQueue {
   }
 
  private:
   }
 
  private:
-  std::vector<folly::MPMCQueue<T>> queues_;
+  std::vector<folly::MPMCQueue<T, Atom, Dynamic>> queues_;
 };
 
 } // namespace folly
 };
 
 } // namespace folly