LWG 2135: terminate() in condition_variable::wait()
authorJonathan Wakely <jwakely@redhat.com>
Mon, 28 Sep 2015 18:44:40 +0000 (19:44 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 28 Sep 2015 18:44:40 +0000 (19:44 +0100)
* include/std/condition_variable (condition_variable::wait): Add
noexcept.
* src/c++11/condition_variable.cc (condition_variable::wait): Call
std::terminate on error (DR 2135).

From-SVN: r228217

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/condition_variable
libstdc++-v3/src/c++11/condition_variable.cc

index 50f6e8b694c6d53b379605b9c76e0d84755d4da6..6b2738f3aed92bf32374a3ff3c0bd67e9c90e2cd 100644 (file)
@@ -1,3 +1,10 @@
+2015-09-28  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/std/condition_variable (condition_variable::wait): Add
+       noexcept.
+       * src/c++11/condition_variable.cc (condition_variable::wait): Call
+       std::terminate on error (DR 2135).
+
 2015-09-25  Ville Voutilainen  <ville.voutilainen@gmail.com>
 
        Avoid creating dangling references in case of nested tuples
index 4714774f1c3d96d421eb4147620322c3f5994b84..f5f773492adeba179f422f09c00c1a9ed34688e9 100644 (file)
@@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     notify_all() noexcept;
 
     void
-    wait(unique_lock<mutex>& __lock);
+    wait(unique_lock<mutex>& __lock) noexcept;
 
     template<typename _Predicate>
       void
index cc0f6e4506a0e6d2aed3479d6a8229d1a878ce14..fd850cb52119289c635eaa1eed51e304a964d4d9 100644 (file)
@@ -48,12 +48,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   }
 
   void
-  condition_variable::wait(unique_lock<mutex>& __lock)
+  condition_variable::wait(unique_lock<mutex>& __lock) noexcept
   {
     int __e = __gthread_cond_wait(&_M_cond, __lock.mutex()->native_handle());
 
     if (__e)
-      __throw_system_error(__e);
+      std::terminate();
   }
 
   void