# std: make RwLock test less intensive · gitcafe/zig

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

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

Visibility: public

Requested revision: b866c14328f0779b38f073b2ee3a8a3e437d129c

Requested commit: b866c14328f0779b38f073b2ee3a8a3e437d129c

Commit: b866c14328f0779b38f073b2ee3a8a3e437d129c

Tree: 4174d7f1b185acda2a1d04f387715e77af7a920c

Author: mlugg

Committer: Matthew Lugg

## Message

```
std: make RwLock test less intensive

This test called `yield` 80,000 times, which is nothing on a system with
little load, but murder on a CI system. macOS' scheduler in particular
doesn't seem to deal with this very well. The `yield` calls also weren't
even necessarily doing what they were meant to: if the optimizer could
figure out that it doesn't clobber some memory, then it could happily
reorder around the `yield`s anyway!

The test has been simplified and made to work better, and the number of
yields have been reduced. The number of overall iterations has also been
reduced, because with the `yield` calls making races very likely, we
don't really need to run too many iterations to be confident that the
implementation is race-free.

```

## Parents

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

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