Commit Graph

4 Commits

Author SHA1 Message Date
Alastair Houghton
d092d4bb66 [Threading][Tests] Don't test timeouts on threading=none.
The preprocessor condition stopping tests from running for threading=none
was in slightly the wrong place.

rdar://100707643
2022-10-03 09:26:25 +01:00
Alastair Houghton
d0f42cad11 [Threading][Win32] Fix the wait functions for Win32 to always over-wait.
Rather than bodging the test to make it more robust, fix the functions
in the Threading layer to behave the same as they do on other platforms,
i.e. to guarantee that they always wait *at least* the amount of time
you asked for.

rdar://100236038
2022-09-29 17:01:59 +01:00
Alastair Houghton
10ab608707 [UnitTests][Threading] Tweak ConditionVariable test for Windows.
Windows' behaviour wrt `Sleep` family functions can be odd.  Apparently,
if you specify a time lower than a system tick, they can return early.
This makes the test flaky when it shouldn't be.  To fix it, we use the
Multimedia functions to adjust the system tick count as low as we can
get it.

rdar://100236038
2022-09-29 15:41:38 +01:00
Alastair Houghton
4495d63c12 [Threading] Add ConditionVariable support.
Swift Concurrency would like to be able to use condition variables.
Add support to the threading packages.

rdar://100236038
2022-09-27 16:21:13 +01:00