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: r148553
This commit is contained in:
Jonathan Wakely 2009-06-16 20:36:01 +00:00 committed by Jonathan Wakely
parent 9a231fd140
commit 864cc1ec71
2 changed files with 7 additions and 2 deletions

View 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-03 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/40296

View 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;
}