It’s a bit hard to explain because any race condition depends on accessing shared state which is a data race. But you can have both threads waiting to check out data, and even though the signaling around the data being checked out is correct (no data race) the logic is still just waiting forever (race condition).
For example one thread safely scans an array and outputs indexes that need to be removed while the other thread removes array items. Without copying the data, the first thread needs proper signaling to know when an index is removed so array length is now shorter.
0
u/[deleted] Jan 02 '22
[deleted]