4#if !defined(OSSIA_FREESTANDING)
6#include <blockingconcurrentqueue.h>
7#include <concurrentqueue.h>
10#if defined(__has_feature)
11#if __has_feature(thread_sanitizer)
14template <
typename T,
size_t MAX_BLOCK_SIZE = 512>
15using spsc_queue = moodycamel::ConcurrentQueue<T>;
18#include <readerwriterqueue.h>
21template <
typename T,
size_t MAX_BLOCK_SIZE = 512>
22using spsc_queue = moodycamel::ReaderWriterQueue<T, MAX_BLOCK_SIZE>;
26#include <readerwriterqueue.h>
29template <
typename T,
size_t MAX_BLOCK_SIZE = 512>
30using spsc_queue = moodycamel::ReaderWriterQueue<T, MAX_BLOCK_SIZE>;
38using mpmc_queue = moodycamel::ConcurrentQueue<T>;
40using blocking_mpmc_queue = moodycamel::BlockingConcurrentQueue<T>;
52 bool try_dequeue(T& t)
56 t = std::move(impl.back());
61 void enqueue(T&& t) { impl.insert(impl.begin(), std::move(t)); }
62 int size_approx() const noexcept {
return impl.size(); }
68using spsc_queue = ossia::minimal_queue<T>;
70using mpmc_queue = ossia::minimal_queue<T>;
72using blocking_mpmc_queue = ossia::minimal_queue<T>;