===== boost/thread/pthread/once.hpp 1.1 vs edited ===== --- 1.1/boost/thread/pthread/once.hpp 2009-07-13 14:46:41 +01:00 +++ edited/boost/thread/pthread/once.hpp 2009-08-12 10:29:30 +01:00 @@ -58,17 +58,21 @@ if(flag.epoch==uninitialized_flag) { flag.epoch=being_initialized; +#ifndef BOOST_NO_EXCEPTIONS try +#endif { pthread::pthread_mutex_scoped_unlock relocker(&detail::once_epoch_mutex); f(); } +#ifndef BOOST_NO_EXCEPTIONS catch(...) { flag.epoch=uninitialized_flag; BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv)); throw; } +#endif flag.epoch=--detail::once_global_epoch; BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv)); }