4 ms·
Doesn't this have all the same problems as the way they currently do it? The only difference between the two is that Apple's implementation puts the flag in a v
by mikeash 12y ago
Doesn't this have all the same problems as the way they currently do it? The only difference between the two is that Apple's implementation puts the flag in a variable, while you're basically proposing to put the flag in code. You still need to ensure proper ordering on both reads and writes and ensure that speculative execution doesn't end up giving you the wrong answer.