aboutsummaryrefslogtreecommitdiffstats
path: root/src/MemlessPoly.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-04-20 12:29:24 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-04-20 12:29:24 +0200
commit411d03ac6b8ee1a8c06f952b9378c90516a715b7 (patch)
tree3236a6121eb9137a79b82699006df877e3876c32 /src/MemlessPoly.h
parent4f9b087a578fac9dffef83cdcb41573468a4ae17 (diff)
downloaddabmod-411d03ac6b8ee1a8c06f952b9378c90516a715b7.tar.gz
dabmod-411d03ac6b8ee1a8c06f952b9378c90516a715b7.tar.bz2
dabmod-411d03ac6b8ee1a8c06f952b9378c90516a715b7.zip
ThreadsafeQueue: add wakeup event instead of custom termination markers
This avoids the issue that the ~SDR termination marker doesn't reach the consumer because it's still prebuffering
Diffstat (limited to 'src/MemlessPoly.h')
-rw-r--r--src/MemlessPoly.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/MemlessPoly.h b/src/MemlessPoly.h
index 4c67d46..7f00261 100644
--- a/src/MemlessPoly.h
+++ b/src/MemlessPoly.h
@@ -78,8 +78,6 @@ private:
struct worker_t {
struct input_data_t {
- bool terminate = false;
-
dpd_type_t dpd_type;
// Valid for polynomial types
@@ -112,9 +110,7 @@ private:
~worker_t() {
if (thread.joinable()) {
- input_data_t terminate_tag;
- terminate_tag.terminate = true;
- in_queue.push(terminate_tag);
+ in_queue.trigger_wakeup();
thread.join();
}
}