Say, 1st thread receives data and creates array A. (Can it communicate that to 2nd thread?)
You can look at Worker constructor for example of events. So, AB_timer currently is taken using CreateWaitableTimer. This can be changed to CreateEvent() instead, And signal using SetEvent() - look at documentation of function details and also in existing code for examples. We already have a stop timer and timer from RTD callback, so you can look there ...
Else, 2nd thread locks it at refresh interval, say 250ms, copies to array B, clears A and releases lock.
1st array continues pushing ticks into A
2nd array pushes ticks from B to AB or Ninja and deletes it.
That's it? Looking good in theory.
1st array continues pushing ticks into A
2nd array pushes ticks from B to AB or Ninja and deletes it.
That's it? Looking good in theory.