aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2021-03-31 15:34:47 -0300
committerAlexandre Oliva <oliva@gnu.org>2021-03-31 15:45:56 -0300
commiteadf009b229ed5d45d1c2d82d72ad2ba9a2e63b1 (patch)
treebf3c9b6fdc0982826faea209160172e08e936e86 /gcc
parentc778968339afd140380a46edbade054667c7dce2 (diff)
downloadgcc-eadf009b229ed5d45d1c2d82d72ad2ba9a2e63b1.zip
gcc-eadf009b229ed5d45d1c2d82d72ad2ba9a2e63b1.tar.gz
gcc-eadf009b229ed5d45d1c2d82d72ad2ba9a2e63b1.tar.bz2
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.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions