Hi guys,
I have an array of structs and (for the time being) two threads which modify its elements. One thread is in charge of the even indexes, and the other of the odd ones.
Do I need in this case any locking/serialization? I think not, but just to make sure...
1 Replies - 195 Views - Last Post: 02 August 2012 - 02:28 AM
#1
Does odd/even array access need concurrent handling?
Posted 02 August 2012 - 02:07 AM
Replies To: Does odd/even array access need concurrent handling?
#2
Re: Does odd/even array access need concurrent handling?
Posted 02 August 2012 - 02:28 AM
Not sure what serialization would have to do with this but you shouldn't need locking code. You'll need it if there is a possibility that the data structure would be altered by one of the threads (size change) or that two (or more) threads would be modifying the same data.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|