* testsuite/30_threads/thread/algorithm/1.cc: Join thread before
program exits.
* testsuite/30_threads/thread/algorithm/2.cc: Likewise.
* testsuite/30_threads/thread/this_thread/3.cc: Define test variable.
* testsuite/30_threads/thread/this_thread/4.cc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140338
138bc75d-0d04-0410-961f-
82ee72b054a4
-2008-09-12 Chris Fairles <chris.fairles@gmail.com>
+2008-09-13 Chris Fairles <chris.fairles@gmail.com>
+
+ * testsuite/30_threads/thread/algorithm/1.cc: Join thread before
+ program exits.
+ * testsuite/30_threads/thread/algorithm/2.cc: Likewise.
+ * testsuite/30_threads/thread/this_thread/3.cc: Define test variable.
+ * testsuite/30_threads/thread/this_thread/4.cc: Likewise.
+
+2008-09-12 Chris Fairles <chris.fairles@gmail.com>
Benjamin Kosnik <bkoz@redhat.com>
* include/std/thread: New.
try
{
- std::thread t1(f);
- std::thread::id t1_id = t1.get_id();
-
- std::thread t2;
- t2.swap(std::move(t1));
-
- VERIFY( t1.get_id() == std::thread::id() );
- VERIFY( t2.get_id() == t1_id );
+ std::thread t1(f);
+ std::thread::id t1_id = t1.get_id();
+
+ std::thread t2;
+ t2.swap(std::move(t1));
+
+ VERIFY( t1.get_id() == std::thread::id() );
+ VERIFY( t2.get_id() == t1_id );
+
+ t2.join();
}
catch (const std::system_error&)
{
VERIFY( t1.get_id() == std::thread::id() );
VERIFY( t2.get_id() == t1_id );
+
+ t2.join();
}
catch (const std::system_error&)
{
std::swap(std::move(t1), t2);
VERIFY( t2.get_id() == t1_id );
+
+ t2.join();
}
catch (const std::system_error&)
{
std::swap(t2, std::move(t1));
VERIFY( t2.get_id() == t1_id );
+
+ t2.join();
}
catch (const std::system_error&)
{
void foo()
{
+ bool test __attribute__((unused)) = true;
+
chr::system_clock::time_point begin = chr::system_clock::now();
chr::microseconds ms(500);
void foo()
{
+ bool test __attribute__((unused)) = true;
+
chr::system_clock::time_point begin = chr::system_clock::now();
chr::microseconds ms(500);