diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-11-04 16:18:00 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-11-04 16:18:00 +0100 |
commit | ab81d68d7e9a8624dae1d5ad879f67aebb211069 (patch) | |
tree | 87834f24ee7959ef22496e4881cba98546e0f044 /include | |
parent | cc239ab9636e168ef92aa7f5ab0a515fadd02158 (diff) |
Fetch latest message immediately when going to room even if sync is not finished
Diffstat (limited to 'include')
-rw-r--r-- | include/MessageQueue.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/MessageQueue.hpp b/include/MessageQueue.hpp index df331ac..4f1e036 100644 --- a/include/MessageQueue.hpp +++ b/include/MessageQueue.hpp @@ -41,6 +41,11 @@ namespace QuickMedia { std::unique_lock<std::mutex> lock(mutex); data_queue.clear(); } + + void restart() { + std::unique_lock<std::mutex> lock(mutex); + running = true; + } private: std::deque<T> data_queue; std::mutex mutex; |