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.
ff18103ef6Alex Kladov committed on 4/15/2024, 10:24:30 PM· committed by Andrew Kelleyparent1e5075f
1 file changedLine totals unavailable