I have 20 threads that all start by reading from one huge data array. Most of the time the codes run smoothly. However, once in a while, without reproducible pattern, one or two threads will say no data.
I think it may be a race condition among the threads while reading the huge array. I plan to implement sleep routine or atomic lock. But race conditions should not occur while reading from a memory block, right?