You have the followi开发者_如何学Gong scenario:
//Two threads, using shared data
shared data = 2
Thread1: reads shared data
Thread2: reads shared data
Thread1: shared data = read value + 1
Thread2: shared data = read value + 1
result: shared data = 3
//Should have been 4 if not for this problem.
I don't want a solution for the problem, I know how to fix it and it is not relevant for the actual question.
I want the technical term for this specific kind of problem that comes with concurrency. Using it for a technical report.
Isn't that simply known as a race condition?
精彩评论