I am using multiple threads that are doing work. I need the threads to update an integer once they finish processing.
//Lock
i_Flag++;
//Unlock
Then
if(i_Flag == i_ThreadCount)
//Do something.
My question is whether I need to use locks around i_Flag++ because it is a simple operation.
Thank you