summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp')
-rw-r--r--graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp
new file mode 100644
index 0000000000..17e965eadf
--- /dev/null
+++ b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp
@@ -0,0 +1,20 @@
+#include "threaded_queue.h"
+
+// static
+bool MultiQueueWaiter::HasState(
+ std::initializer_list<BaseThreadQueue*> queues) {
+ for (BaseThreadQueue* queue : queues) {
+ if (!queue->IsEmpty())
+ return true;
+ }
+ return false;
+}
+
+bool MultiQueueWaiter::ValidateWaiter(
+ std::initializer_list<BaseThreadQueue*> queues) {
+ for (BaseThreadQueue* queue : queues) {
+ if (queue->waiter.get() != this)
+ return false;
+ }
+ return true;
+}