Zen*_*Zen 0 concurrency multithreading
您有以下情形:
//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.
Run Code Online (Sandbox Code Playgroud)
我不想要解决这个问题的方法,我知道如何修复它,它与实际问题无关.
我想要并发的这种特定问题的技术术语.用它来做技术报告.