>
>> I probably should have phrased my question better with the array, what I 
>> was
>> wondering is if it was safe for say two threads to right to the array at 
>> the same
>> time as long as I'm sure they're not writing to the same index of the 
>> array?
>
> You can do anything you want without thread safety, but you run the risk 
> of deadlocks or corrupted memory.
That is why the question was whether it was safe.

>
> The problem isn't writing to two different elements of an array,

>the hard  part is *ensuring* that you are writing to two different elements 
>of an  array.  Multithreading code is tough to write correctly, you may 
>want to  read a book on it.
And sometimes it is extremely easy to ensure you are never writing to the 
same elements.



Reply via email to