Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81173 - trunk/libs/thread/src/pthread
From: vicente.botet_at_[hidden]
Date: 2012-11-04 12:38:10


Author: viboes
Date: 2012-11-04 12:38:09 EST (Sun, 04 Nov 2012)
New Revision: 81173
URL: http://svn.boost.org/trac/boost/changeset/81173

Log:
Thread: cleanup+uncomment catch all
Text files modified:
   trunk/libs/thread/src/pthread/thread.cpp | 35 +++++++++--------------------------
   1 files changed, 9 insertions(+), 26 deletions(-)

Modified: trunk/libs/thread/src/pthread/thread.cpp
==============================================================================
--- trunk/libs/thread/src/pthread/thread.cpp (original)
+++ trunk/libs/thread/src/pthread/thread.cpp 2012-11-04 12:38:09 EST (Sun, 04 Nov 2012)
@@ -41,16 +41,11 @@
                 i->second->unlock();
                 i->first->notify_all();
             }
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
             for (async_states_t::iterator i = async_states_.begin(), e = async_states_.end();
                     i != e; ++i)
             {
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
                 (*i)->make_ready();
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
             }
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
-
         }
 
         struct thread_exit_callback_node
@@ -77,15 +72,11 @@
             {
                 static void tls_destructor(void* data)
                 {
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
                     boost::detail::thread_data_base* thread_info=static_cast<boost::detail::thread_data_base*>(data);
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
                     if(thread_info)
                     {
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
                         while(!thread_info->tss_data.empty() || thread_info->thread_exit_callbacks)
                         {
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
 
                             while(thread_info->thread_exit_callbacks)
                             {
@@ -112,17 +103,11 @@
                                 thread_info->tss_data.erase(current);
                             }
                         }
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
- if (thread_info) {
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
- thread_info->self.reset();
- } else{
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
-
+ if (thread_info) // fixme: should we test this?
+ {
+ thread_info->self.reset();
                         }
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
                     }
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
                 }
             }
 
@@ -185,13 +170,12 @@
                 }
 // Removed as it stops the debugger identifying the cause of the exception
 // Unhandled exceptions still cause the application to terminate
- BOOST_CATCH(...)
- {
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
- throw;
-
- std::terminate();
- }
+// BOOST_CATCH(...)
+// {
+// throw;
+//
+// std::terminate();
+// }
                 BOOST_CATCH_END
 #endif
                 detail::tls_destructor(thread_info.get());
@@ -199,7 +183,6 @@
                 boost::lock_guard<boost::mutex> lock(thread_info->data_mutex);
                 thread_info->done=true;
                 thread_info->done_condition.notify_all();
- //std::cout << __FILE__ << ":" << __LINE__ <<std::endl;
 
                 return 0;
             }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk