Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Consider, for example, two threads that call toggle(). The expected effect of toggling flag twice is to restore that it is restored to its original value. However, the following scenario leaves flag in the incorrect state:

...