------- Comment #2 from paolo dot carlini at oracle dot com  2009-12-16 16:01 
-------
For now I would suggest we do something like this and deal with better
solutions as enhancements. What do you think Jon?

Index: thread.cc
===================================================================
--- thread.cc   (revision 155290)
+++ thread.cc   (working copy)
@@ -83,6 +83,9 @@
   void
   thread::_M_start_thread(__shared_base_type __b)
   {
+    if (!__gthread_active_p())
+      __throw_system_error(int(errc::operation_not_permitted));
+
     __b->_M_this_ptr = __b;
     int __e = __gthread_create(&_M_id._M_thread,
                               &execute_native_thread_routine, __b.get());


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42198

Reply via email to