# std.Progress: fix data race · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d210f733f80731487f8f83caf621e04506f50bb4)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d210f733f80731487f8f83caf621e04506f50bb4

Requested commit: d210f733f80731487f8f83caf621e04506f50bb4

Commit: d210f733f80731487f8f83caf621e04506f50bb4

Tree: 4bd9994db3bec04dd8eb9c39944189c35c53f8f5

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Progress: fix data race

In end(), the freelist pointer is owned so the bare store would be ok.
However, there is a load in start() that can happen at the same time, if
another start() and end() pair grabs that same index.

I don't think this fixes #21663 actually because even if the data race
corrupts the value for `next`, the cmpxchg protects the value from being
stored there.

```

## Parents

- [6bf52b0505ad7317b5f0d6fa77b7c41318b9c73b](https://git.cafe/gitcafe/zig/commit/6bf52b0505ad7317b5f0d6fa77b7c41318b9c73b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d210f733f80731487f8f83caf621e04506f50bb4?format=markdown)
