MB-20054: Fix windows build error by adding size() func in class AtomicQueue
[ep-engine.git] / src / atomicqueue.h
index 531ac32..2b777ee 100644 (file)
@@ -51,6 +51,13 @@ public:
         return queue.empty();
     }
 
+    /**
+     * Return the number of queued items.
+     */
+    size_t size() {
+        std::lock_guard<std::mutex> lock(mutex);
+        return queue.size();
+    }
 private:
     std::queue<T> queue;
     std::mutex mutex;