I have a TObjectList that needs to be processed by several threads. Since internally TObjectList inherits from TList and TList implements its internals as an array I wonder:
Is it thread safe to access the array from different threads as long as we access different indexes?
For example, having a TObjectList called myObjectList:
start = 0; end = myObjectList.Count div 2;
Thread1:
for i := 0 to end do
Process(myObjectList[i]);
Thread2:
for i := end + 1 to myObjectList.Count - 1 do
Process(myObjectList[i]);