llvm-project/libcxx/test/std/thread/thread.semaphore
Arthur O'Dwyer c92a253cf0 [libc++] Fix hang in counting_semaphore::try_acquire
Before this patch, `try_acquire` blocks instead of returning false.
This is because `__libcpp_thread_poll_with_backoff` interprets zero
as meaning infinite, causing `try_acquire` to wait indefinitely.

Thanks to Pablo Busse (pabusse) for the patch!

Differential Revision: https://reviews.llvm.org/D98334
2021-11-05 15:57:46 -04:00
..
acquire.pass.cpp [libc++] Remove non-atomic "platform" semaphore implementations. 2021-11-04 14:33:34 -04:00
binary.pass.cpp [libc++] Temporarily mark tests as UNSUPPORTED to get the CI green 2021-10-28 16:30:42 -04:00
ctor.compile.pass.cpp [libc++] Remove non-atomic "platform" semaphore implementations. 2021-11-04 14:33:34 -04:00
max.pass.cpp [libc++] counting_semaphore should not be default-constructible. 2021-09-21 16:19:31 -04:00
release.pass.cpp [libc++] Remove non-atomic "platform" semaphore implementations. 2021-11-04 14:33:34 -04:00
timed.pass.cpp [libc++] Temporarily mark tests as UNSUPPORTED to get the CI green 2021-10-28 16:30:42 -04:00
try_acquire.pass.cpp [libc++] Fix hang in counting_semaphore::try_acquire 2021-11-05 15:57:46 -04:00