thread (~thread(), [...]): Call terminate if joinable.
authorJonathan Wakely <jwakely.gcc@gmail.com>
Tue, 16 Jun 2009 20:34:43 +0000 (20:34 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 16 Jun 2009 20:34:43 +0000 (21:34 +0100)
2009-06-16  Jonathan Wakely  <jwakely.gcc@gmail.com>

* include/std/thread (~thread(), operator=(thread&&)): Call terminate
if joinable.

From-SVN: r148552

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/thread

index 2ca72ea84fa3a4c7bd381b39ba831c5a7dc12d98..7d1788032804c39028c8738e87bec704ed1240c5 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-16  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/std/thread (~thread(), operator=(thread&&)): Call terminate
+       if joinable.
+
 2009-06-15  Tom Tromey  <tromey@redhat.com>
 
        * python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't
index fbdfe2ee53fcc42d6c90d264b0f07b423fb7dc23..bf282cc03658d48e2d8157fb645163895141bf91 100644 (file)
@@ -135,7 +135,7 @@ namespace std
     ~thread()
     {
       if (joinable())
-       detach();
+       std::terminate();
     }
 
     thread& operator=(const thread&) = delete;
@@ -143,7 +143,7 @@ namespace std
     thread& operator=(thread&& __t)
     {
       if (joinable())
-       detach();
+       std::terminate();
       swap(__t);
       return *this;
     }