===== boost/thread/pthread/once.hpp 1.1 vs edited =====
old
|
new
|
|
58 | 58 | if(flag.epoch==uninitialized_flag) |
59 | 59 | { |
60 | 60 | flag.epoch=being_initialized; |
| 61 | #ifndef BOOST_NO_EXCEPTIONS |
61 | 62 | try |
| 63 | #endif |
62 | 64 | { |
63 | 65 | pthread::pthread_mutex_scoped_unlock relocker(&detail::once_epoch_mutex); |
64 | 66 | f(); |
65 | 67 | } |
| 68 | #ifndef BOOST_NO_EXCEPTIONS |
66 | 69 | catch(...) |
67 | 70 | { |
68 | 71 | flag.epoch=uninitialized_flag; |
69 | 72 | BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv)); |
70 | 73 | throw; |
71 | 74 | } |
| 75 | #endif |
72 | 76 | flag.epoch=--detail::once_global_epoch; |
73 | 77 | BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv)); |
74 | 78 | } |