mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-04 23:14:53 -04:00
Threads vs. Queues lifetimes, cleanups.
- Ideally Queues must outlive the threads using them, but wasn't done so. Yes, std::shared_ptr them! - Now queues are always valid in the context of the threads using them. - No longer need tedious queues deallocation by the original owner. - Misc cleanups.
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
class ThreadQueueBase {
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<ThreadQueueBase> ThreadQueueBasePtr;
|
||||
|
||||
/** A thread-safe asynchronous blocking queue */
|
||||
template<typename T>
|
||||
class ThreadBlockingQueue : public ThreadQueueBase {
|
||||
|
||||
Reference in New Issue
Block a user