Inspired by this question: In Complexity Analysis why is ++ considered to be 2 operations?
Take the following psuedo code:
class test
{
int _counter;
void Increment()
{
_counter++;
}
}
Would this be considered thread safe on an x86 architechure? Further more are the Inc / Dec assembly instructions thread safe?
See Question&Answers more detail:os