Hi, I have a question, I have a data structure (containing float values) that i have numerous threads reading and writing.
Sometimes, this data structure will have to be read and written to by multiple threads. The threads will of course, interfere with each other, as they have no idea when the other threads will be reading/writing from it.
How can I go about preventing these race conditions? I know that any lock will be slow because of course, you are blocking potentially a large number of threads. However, the order that each thread read/writes into the data structure is highly structured, and these kinds of conflicts should actually happen fairly irregularly.