aboutsummaryrefslogtreecommitdiff
path: root/src/util/container.h
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-09-19 20:56:13 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-09-19 20:56:13 +0200
commitc8900e169a1ddceec07a449f1ae7c4322ff02036 (patch)
tree5156605fb473d25786426eb6876ba2e7d3b7507b /src/util/container.h
parent950d2c9b3e10cbace9236e820c8119d1abb9e01f (diff)
parente0529da5c84f224c380e6d5e063392cb01f85683 (diff)
downloaddragonfireclient-c8900e169a1ddceec07a449f1ae7c4322ff02036.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/util/container.h')
-rw-r--r--src/util/container.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/container.h b/src/util/container.h
index 1c4a219f0..001066563 100644
--- a/src/util/container.h
+++ b/src/util/container.h
@@ -140,6 +140,13 @@ public:
m_signal.post();
}
+ void push_back(T &&t)
+ {
+ MutexAutoLock lock(m_mutex);
+ m_queue.push_back(std::move(t));
+ m_signal.post();
+ }
+
/* this version of pop_front returns a empty element of T on timeout.
* Make sure default constructor of T creates a recognizable "empty" element
*/