From bd19a512fc99200ee1f62e604c7b99441e86dcd8 Mon Sep 17 00:00:00 2001 From: heck Date: Tue, 6 Dec 2022 22:05:10 +0100 Subject: [PATCH] Enhancement: add emplace_front() for completeness --- src/locked_queue.hh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/locked_queue.hh b/src/locked_queue.hh index 0a81cd9..171e8d8 100644 --- a/src/locked_queue.hh +++ b/src/locked_queue.hh @@ -146,6 +146,15 @@ namespace utility { _cv.notify_one(); } + void emplace_front(const T&& data) + { + { + Lock L(_mtx); + _q.emplace_front(data); + } + _cv.notify_one(); + } + void push_front(const T& data) { {