Commit Graph

14 Commits

Author SHA1 Message Date
vsonnier 1d2e35cbac More Spin locks experiments 2019-03-05 06:44:58 +01:00
vsonnier aec0100f78 ThreadBlockingQueue : remove useless/dangerous operations, forbid both copy and assignment. 2017-09-10 19:35:12 +02:00
vsonnier 3f90cbb858 Flush queues on terminate() calls to unblock push()s and so ease threads termination 2017-08-28 20:53:21 +02:00
vsonnier c64baab99d 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.
2017-08-13 19:19:25 +02:00
vsonnier 9b0ce69e8f Use the nuclear option to solve the hung problem:
Besides deadlocks, a thread can in theory get stuck in a blocking pop(),
not seeing the stopping flag in particular. So assure liveness by making all
pop() timed pop.
2017-05-25 09:32:27 +02:00
vsonnier 77a82e1617 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
2017-05-25 08:03:08 +02:00
vsonnier 4b323e9863 Make ReBuffer refcount management automatic, using std::shared_ptr:
- No longer need to call setRefCount() / decRefCount()
- Restore old ThreadBlockingQueue using std::deque, for std::shared_ptr correct behaviour.
2017-05-24 12:28:37 +02:00
vsonnier af20f680a4 Clearer ThreadBlockingQueue impl by using a field to hold size... 2017-05-21 21:04:12 +02:00
vsonnier 41c7dd231b Fix tabs introduced in latest commits... 2017-05-21 10:03:21 +02:00
vsonnier e0af609224 Use a circular buffer for ThreadBlockingQueue (allocation-free) 2017-05-21 09:39:29 +02:00
Charles J. Cliffe 8dfb8ea3f1 minor fixes 2017-02-16 21:54:18 -05:00
vsonnier 7d412eccb6 BLOCKING_QUEUE: display current Thread id in both hex and decimal so both worlds are happy (GDB and Visual Studio) 2017-02-14 18:42:12 +01:00
vsonnier 25f7ba386d BLOCKING_QUEUE: remove ThreadBlockingQueue dependency to ThreadQueue, remove ThreadQueue.h from CMakeLists 2017-02-14 18:42:11 +01:00
vsonnier c7467a88bc BLOCKING_QUEUE: prepare by raising up max queue lenghts
BLOCKING_QUEUE: Replaced ThreadQueue usage by ThreadBlockingQueue usage
BLOCKING_QUEUE: instrument all push() with timeouts, showed some call have to be non-blocking...
BLOCKING_QUEUE: tuned push()/try_push()
2017-02-14 18:42:05 +01:00