Inspired by this question: http://stackoverflow.com/questions/443423/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?