I found an example of a race condition that I was able to reproduce under `g++` in linux. What I don't understand is how the order of operations matter in this example.

```
int va = 0;

void fa() {
    for (int i = 0; i < 10000; ++i)
        ++va;
}

void fb() {
    for (int i = 0; i < 10000; ++i)
        --va;
}

int main() {
    std::thread a(fa);
    std::thread b(fb);
    a.join();
    b.join();
    std::cout << va;
}

```

I can undertand that the order matters if I had used `va = va + 1;` because then RHS `va` could have changed before getting back to assigned LHS `va`. Can someone clarify?