Hi,
A few questions that, I think, need to be answered to determine a nice way to stop the application :
1. How many tasks do you need to stop at the same time ?
2. What kind of task are we talking about ? (I guess you have some instrument control, measurments, what else ?)
3. Is it important to stop all the task exactly at the same time ?
I can remenber a
discussion started by Ben a while ago, basically he had lots of parallel task (about 5 or 6 hundred timed loops) and he had just 1 global variable to stop these tasks at the same time and after noticing some issues (update of the global variable in the user interface thread as far as I can remember) so after benchmarking different techniques (notifier, queues, FGV) he went for an FGV.
Hope this helps
😉
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
Antoine Chalons