From cd3b0fafaaebab56b17ec9f4fceff4c0f8e26aec Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 16 Jun 2009 20:34:43 +0000 Subject: [PATCH] thread (~thread(), [...]): Call terminate if joinable. 2009-06-16 Jonathan Wakely * include/std/thread (~thread(), operator=(thread&&)): Call terminate if joinable. From-SVN: r148552 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/std/thread | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2ca72ea84fa..7d178803280 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2009-06-16 Jonathan Wakely + + * include/std/thread (~thread(), operator=(thread&&)): Call terminate + if joinable. + 2009-06-15 Tom Tromey * python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread index fbdfe2ee53f..bf282cc0365 100644 --- a/libstdc++-v3/include/std/thread +++ b/libstdc++-v3/include/std/thread @@ -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; }