Commit cd3b0faf by Jonathan Wakely Committed by Jonathan Wakely

thread (~thread(), [...]): Call terminate if joinable.

2009-06-16  Jonathan Wakely  <jwakely.gcc@gmail.com>

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

From-SVN: r148552
parent 504b33d8
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> 2009-06-15 Tom Tromey <tromey@redhat.com>
* python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't * python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't
......
...@@ -135,7 +135,7 @@ namespace std ...@@ -135,7 +135,7 @@ namespace std
~thread() ~thread()
{ {
if (joinable()) if (joinable())
detach(); std::terminate();
} }
thread& operator=(const thread&) = delete; thread& operator=(const thread&) = delete;
...@@ -143,7 +143,7 @@ namespace std ...@@ -143,7 +143,7 @@ namespace std
thread& operator=(thread&& __t) thread& operator=(thread&& __t)
{ {
if (joinable()) if (joinable())
detach(); std::terminate();
swap(__t); swap(__t);
return *this; return *this;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment