02-08-2010 08:28 AM - edited 02-08-2010 08:30 AM
Solved! Go to Solution.
02-08-2010 08:40 AM
As far as I can understand the situation, the answer should be 'yes': the array is protected until you leave the critical section.
But could I suggest an alternative, perhaps simpler approach?
If you configure a thread safe queue of 44100 elements which discards old elements, with T1 that fills it on top, T2 can freely read from the queue without disturbing T1, having available the most recent set of data in any moment.
02-09-2010 03:47 AM
Thank you for the kindness of answering my post even though it was in the wrong place 🙂
I am analyzing a couple of alternatives at the moment (the situation in my app is a bit more complex than I described here), but the thread-safe queue might be a good idea for at least part of my data structure requirements!