gcc/libstdc++-v3/testsuite/30_threads
Alexandre Oliva eadf009b22 improve future::poll calibration loop
The calibration loop I've recently added to the libstdc++
future/members/poll.cc tests could still select iteration counts that
might yield zero-time measurements for the wait_for when ready loop.

Waiting for a future that has already had a value set is presumably
uniformly faster than a zero-timed wait for a result, so I've changed
the calibration loop to use the former.

We might still be unlucky and get nonzero from the initial loop, so
that the calibration is skipped altogether, but then get zero from the
later when-ready loop.  I'm not dealing with this case in this patch.


for  libstdc++-v3/ChangeLog

	* testsuite/30_threads/future/members/poll.cc: Use faster
	after-ready call in the calibration loop.
2021-03-31 15:45:56 -03:00
..
async libstdc++: XFAIL tests that depends on RTTI 2021-02-12 14:30:13 +00:00
barrier Add options to link with libatomic in various tests. 2021-03-10 16:01:12 +00:00
call_once libstdc++: Revert to old std::call_once implementation [PR 99341] 2021-03-16 12:25:28 +00:00
condition_variable Update copyright years. 2021-01-04 10:26:59 +01:00
condition_variable_any Update copyright years. 2021-01-04 10:26:59 +01:00
future improve future::poll calibration loop 2021-03-31 15:45:56 -03:00
headers Update copyright years. 2021-01-04 10:26:59 +01:00
jthread Update copyright years. 2021-01-04 10:26:59 +01:00
latch Add options to link with libatomic in various tests. 2021-03-10 16:01:12 +00:00
lock Update copyright years. 2021-01-04 10:26:59 +01:00
lock_guard Update copyright years. 2021-01-04 10:26:59 +01:00
mutex Update copyright years. 2021-01-04 10:26:59 +01:00
packaged_task Update copyright years. 2021-01-04 10:26:59 +01:00
promise Update copyright years. 2021-01-04 10:26:59 +01:00
recursive_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
recursive_timed_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
scoped_lock Update copyright years. 2021-01-04 10:26:59 +01:00
semaphore Add options to link with libatomic in various tests. 2021-03-10 16:01:12 +00:00
shared_future Update copyright years. 2021-01-04 10:26:59 +01:00
shared_lock Update copyright years. 2021-01-04 10:26:59 +01:00
shared_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
shared_timed_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
stop_token Update copyright years. 2021-01-04 10:26:59 +01:00
this_thread Update copyright years. 2021-01-04 10:26:59 +01:00
thread Update copyright years. 2021-01-04 10:26:59 +01:00
timed_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
try_lock Update copyright years. 2021-01-04 10:26:59 +01:00
unique_lock Update copyright years. 2021-01-04 10:26:59 +01:00