Another fix for the neverending hung application bugs:

- Clear up DemodulatorInstance garbage collection, only do it in a single thread (AppFrame::OnIdle)
- Add a specific mutex lock for the list of deleted demodulators,
- Add a specific lock to control DemodulatorInstance thread lifetimes, protecting IsTerminated() of concurrent join and delete
This commit is contained in:
vsonnier
2017-05-24 18:55:37 +02:00
parent 4b323e9863
commit 77a82e1617
8 changed files with 33 additions and 21 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ public:
/*! Create safe blocking queue. */
ThreadBlockingQueue() {
//at least 1 (== Exchanger)
//at least 1 (== Java SynchronizedQueue)
m_max_num_items = MIN_ITEM_NB;
};
@@ -258,7 +258,7 @@ public:
}
private:
//TODO: use a circular buffer structure ? (fixed array + modulo)
std::deque<T> m_queue;
mutable std::mutex m_mutex;