libstdc++: Improve std::async test
authorMike Crowe <mac@mcrowe.com>
Fri, 11 Sep 2020 13:24:59 +0000 (14:24 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 11 Sep 2020 13:24:59 +0000 (14:24 +0100)
commitf639343dc8c4fa65342a8c1fd43384999cf9f9d0
treeb2f5b46ed3bb3e1a1d2c4c7f7aae64b4207d5a36
parent55bdee9af3cff04192c64a573fa1767b48918efa
libstdc++: Improve std::async test

Add tests for waiting for the future using both chrono::steady_clock and
chrono::system_clock in preparation for dealing with those clocks
properly in futex.cc.

libstdc++-v3/ChangeLog:

* testsuite/30_threads/async/async.cc (test02): Test steady_clock
with std::future::wait_until.
(test03): Add new test templated on clock type waiting for future
associated with async to resolve.
(main): Call test03 to test both system_clock and steady_clock.
libstdc++-v3/testsuite/30_threads/async/async.cc