diff options
-rw-r--r-- | libcxx/test/thread/futures/futures.async/async.pass.cpp | 19 | ||||
-rw-r--r-- | libcxx/www/cxx1y_status.html | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/libcxx/test/thread/futures/futures.async/async.pass.cpp b/libcxx/test/thread/futures/futures.async/async.pass.cpp index 697eb089c62..f67abe4ffd8 100644 --- a/libcxx/test/thread/futures/futures.async/async.pass.cpp +++ b/libcxx/test/thread/futures/futures.async/async.pass.cpp @@ -55,6 +55,12 @@ std::unique_ptr<int> f4(std::unique_ptr<int>&& p) return std::move(p); } +void f5(int i) +{ + std::this_thread::sleep_for(ms(200)); + throw i; +} + int main() { { @@ -174,4 +180,17 @@ int main() Clock::time_point t1 = Clock::now(); assert(t1-t0 < ms(100)); } + + { + std::future<void> f = std::async(f5, 3); + std::this_thread::sleep_for(ms(300)); + try { f.get(); assert (false); } catch ( int ex ) {} + } + + { + std::future<void> f = std::async(std::launch::deferred, f5, 3); + std::this_thread::sleep_for(ms(300)); + try { f.get(); assert (false); } catch ( int ex ) {} + } + } diff --git a/libcxx/www/cxx1y_status.html b/libcxx/www/cxx1y_status.html index 04c3730ae5a..8335a5fb1ef 100644 --- a/libcxx/www/cxx1y_status.html +++ b/libcxx/www/cxx1y_status.html @@ -266,7 +266,7 @@ <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2359">2359</a></td><td>How does regex_constants::nosubs affect basic_regex::mark_count()?</td><td>Issaquah</td><td>Complete</td></tr> <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2360">2360</a></td><td>reverse_iterator::operator*() is unimplementable</td><td>Issaquah</td><td>Complete</td></tr> <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2104">2104</a></td><td>unique_lock move-assignment should not be noexcept</td><td>Issaquah</td><td>Complete</td></tr> - <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2186">2186</a></td><td>Incomplete action on async/launch::deferred</td><td>Issaquah</td><td></td></tr> + <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2186">2186</a></td><td>Incomplete action on async/launch::deferred</td><td>Issaquah</td><td>Complete</td></tr> <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2075">2075</a></td><td>Progress guarantees, lock-free property, and scheduling assumptions</td><td>Issaquah</td><td></td></tr> <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2288">2288</a></td><td>Inconsistent requirements for shared mutexes</td><td>Issaquah</td><td>Complete</td></tr> <!-- <tr><td></td><td></td><td></td><td></td></tr> --> |