A Relaxed Guide to memory_order_relaxedatomic objects, that is... - Small problems: Out of thin air (OOTA) & read from untaken branch (RFUB) ☐ Small but persistent: Java has been attacking a similar problem for more than 20 years ☐ Some (OOTA) Not believed to occur in practice. Should be disallowed, but hard to do so. (2 variants) - (RFUB) Very rarely occurs in practice. Controversial, but majority of SG1 leans towards allowing it. ## imprecise ... Strict $ C++20 =_{def} C++20 $ without this hand-waving ## Read-from unexecuted branch (RFUB) ## atomicx(0), y(0); Thread 1: int r1 = r1x x; y = r1x r1; Can result in x = y = 42 and 0 码力 | 32 页 | 278.53 KB | 1 年前3
共 1 条
- 1













