4 ms·
You put your interfering bits (critical sections) in transactions. Starting with a read and ending with a write. If you were to retry right after a read (but be
by lucian1900 15y ago
You put your interfering bits (critical sections) in transactions. Starting with a read and ending with a write. If you were to retry right after a read (but before a write), you would get incorrect results. And read/write pairs can get complex.
Rich is right about correctness. With an STM, it's comparatively easy to get correct behaviour from your program, which is more important than performance.