N3188 - Revision to N3113: Async Launch Policies (CH 36)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120027 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/thread/futures/futures.async/async.pass.cpp b/test/thread/futures/futures.async/async.pass.cpp
index 16565e7..697eb08 100644
--- a/test/thread/futures/futures.async/async.pass.cpp
+++ b/test/thread/futures/futures.async/async.pass.cpp
@@ -82,7 +82,7 @@
assert(t1-t0 < ms(100));
}
{
- std::future<int> f = std::async(std::launch::sync, f0);
+ std::future<int> f = std::async(std::launch::deferred, f0);
std::this_thread::sleep_for(ms(300));
Clock::time_point t0 = Clock::now();
assert(f.get() == 3);
@@ -115,7 +115,7 @@
assert(t1-t0 < ms(100));
}
{
- std::future<int&> f = std::async(std::launch::sync, f1);
+ std::future<int&> f = std::async(std::launch::deferred, f1);
std::this_thread::sleep_for(ms(300));
Clock::time_point t0 = Clock::now();
assert(&f.get() == &i);
@@ -148,7 +148,7 @@
assert(t1-t0 < ms(100));
}
{
- std::future<void> f = std::async(std::launch::sync, f2);
+ std::future<void> f = std::async(std::launch::deferred, f2);
std::this_thread::sleep_for(ms(300));
Clock::time_point t0 = Clock::now();
f.get();
diff --git a/test/thread/futures/futures.overview/launch.pass.cpp b/test/thread/futures/futures.overview/launch.pass.cpp
index 1e6a92f..63eebe9 100644
--- a/test/thread/futures/futures.overview/launch.pass.cpp
+++ b/test/thread/futures/futures.overview/launch.pass.cpp
@@ -11,16 +11,16 @@
// enum class launch
// {
-// any,
-// async,
-// sync
+// async = 1,
+// deferred = 2,
+// any = async | deferred
// };
#include <future>
int main()
{
- static_assert(std::launch::any == 0, "");
+ static_assert(std::launch::any == std::launch::async | std::launch::deferred, "");
static_assert(std::launch::async == 1, "");
- static_assert(std::launch::sync == 2, "");
+ static_assert(std::launch::deferred == 2, "");
}