From 1641a7c1cb198cb5bb4b96d0890d1e7d13e089c4 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Wed, 26 Mar 2014 02:45:04 +0000 Subject: Implement LWG issue #2135. If something goes wrong in condition_variable::wait, call terminate() rather than throwing an error. Do this indirectly, by marking the call as 'noexcept'. This is better than just calling terminate() directly, because it gives a better error message on the console. llvm-svn: 204778 --- libcxx/src/condition_variable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcxx/src') diff --git a/libcxx/src/condition_variable.cpp b/libcxx/src/condition_variable.cpp index de0f6f47dd1..061d1388d3e 100644 --- a/libcxx/src/condition_variable.cpp +++ b/libcxx/src/condition_variable.cpp @@ -32,7 +32,7 @@ condition_variable::notify_all() _NOEXCEPT } void -condition_variable::wait(unique_lock& lk) +condition_variable::wait(unique_lock& lk) _NOEXCEPT { if (!lk.owns_lock()) __throw_system_error(EPERM, @@ -44,7 +44,7 @@ condition_variable::wait(unique_lock& lk) void condition_variable::__do_timed_wait(unique_lock& lk, - chrono::time_point tp) + chrono::time_point tp) _NOEXCEPT { using namespace chrono; if (!lk.owns_lock()) -- cgit v1.2.3