diff options
| author | Alex Kladov <aleksey.kladov@gmail.com> | 2024-04-15 13:57:41 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-04-15 15:24:30 -0700 |
| commit | ff18103ef6d383b6c6f81d996925f3a7856851e9 (patch) | |
| tree | 9945d6abc1ed66b8c47e5b04e751f204bfd391cf /lib/std/Build | |
| parent | 1e5075f81296cccd469a0829259231cb34337a02 (diff) | |
| download | zig-ff18103ef6d383b6c6f81d996925f3a7856851e9.tar.gz zig-ff18103ef6d383b6c6f81d996925f3a7856851e9.zip | |
std: improve std.once tests
* fix UB when Thread.spawn fails, and we try to join uninitialized
threads (through new `thread_count` variable).
* make sure that the tests pins down synchronization guarantees: in the
main thread, we can observe `1` due to synchronization from
`Thread.join()`. To make sure that once uses Acq/Rel, and not just
relaxed, we should also additionally check that each thread observes
1, regardless of whether it was the one to call once.
Diffstat (limited to 'lib/std/Build')
0 files changed, 0 insertions, 0 deletions
