From 43797c2b74b84a8cbc790983ba8fb272553ac72a Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 28 Feb 2019 10:12:30 -0800 Subject: [PATCH] ircd::ctx::queue: Switch to std::deque backing. --- include/ircd/ctx/queue.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ircd/ctx/queue.h b/include/ircd/ctx/queue.h index 0c7eb29de..7363fed4b 100644 --- a/include/ircd/ctx/queue.h +++ b/include/ircd/ctx/queue.h @@ -20,7 +20,7 @@ template class ircd::ctx::queue { dock d; - std::queue q; + std::deque q; size_t w {0}; public: @@ -54,7 +54,7 @@ void ircd::ctx::queue::push(T&& t) noexcept { - q.push(std::forward(t)); + q.push_back(std::forward(t)); d.notify(); } @@ -62,7 +62,7 @@ template void ircd::ctx::queue::push(const T &t) { - q.push(t); + q.push_back(t); d.notify(); } @@ -92,7 +92,7 @@ ircd::ctx::queue::pop() assert(!q.empty()); auto ret(std::move(q.front())); - q.pop(); + q.pop_front(); return ret; }