Ticket #3335: once.hpp.patch

File once.hpp.patch, 1023 bytes (added by Andrew Chittenden <andyc@…>, 13 years ago)

patch to boost/thread/pthread/once.hpp to make it BOOST_NO_EXCEPTIONS aware.

  • boost/thread/pthread/once.hpp

    ===== boost/thread/pthread/once.hpp 1.1 vs edited =====
    old new  
    5858                if(flag.epoch==uninitialized_flag)
    5959                {
    6060                    flag.epoch=being_initialized;
     61#ifndef BOOST_NO_EXCEPTIONS
    6162                    try
     63#endif
    6264                    {
    6365                        pthread::pthread_mutex_scoped_unlock relocker(&detail::once_epoch_mutex);
    6466                        f();
    6567                    }
     68#ifndef BOOST_NO_EXCEPTIONS
    6669                    catch(...)
    6770                    {
    6871                        flag.epoch=uninitialized_flag;
    6972                        BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv));
    7073                        throw;
    7174                    }
     75#endif
    7276                    flag.epoch=--detail::once_global_epoch;
    7377                    BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv));
    7478                }