Take away: atomic is great, but could still be problematic if not properly used. Typical error is to split a block that should be in an atomic block into multiple atomic blocks.
unparalleled
What we see above can also be seen as a potential race condition.
hzxa21
But this is also a problem when not using atomic but locks. If the programmer separated logically atomic code sequences into two critical sections protected by locks, the same problem occurs.
Take away: atomic is great, but could still be problematic if not properly used. Typical error is to split a block that should be in an atomic block into multiple atomic blocks.
What we see above can also be seen as a potential race condition.
But this is also a problem when not using atomic but locks. If the programmer separated logically atomic code sequences into two critical sections protected by locks, the same problem occurs.