mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-27 22:14:26 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user