update boost
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <typeinfo>
|
||||
#include <sstream>
|
||||
|
||||
namespace boost{
|
||||
@@ -120,7 +121,7 @@ class intermodule_singleton_common
|
||||
}
|
||||
}
|
||||
if(previous_module_singleton_initialized == Uninitialized){
|
||||
try{
|
||||
BOOST_TRY{
|
||||
//Now initialize the global map, this function must solve concurrency
|
||||
//issues between threads of several modules
|
||||
initialize_global_map_handle();
|
||||
@@ -142,11 +143,11 @@ class intermodule_singleton_common
|
||||
//before this one. Now marked as initialized
|
||||
atomic_write32(&this_module_singleton_initialized, Initialized);
|
||||
}
|
||||
catch(...){
|
||||
BOOST_CATCH(...){
|
||||
//Mark singleton failed to initialize
|
||||
atomic_write32(&this_module_singleton_initialized, Broken);
|
||||
throw;
|
||||
}
|
||||
BOOST_RETHROW
|
||||
} BOOST_CATCH_END
|
||||
}
|
||||
//If previous state was initializing, this means that another winner thread is
|
||||
//trying to initialize the singleton. Just wait until completes its work.
|
||||
@@ -231,7 +232,7 @@ class intermodule_singleton_common
|
||||
}
|
||||
else{ //(tmp == Uninitialized)
|
||||
//If not initialized try it again?
|
||||
try{
|
||||
BOOST_TRY{
|
||||
//Remove old global map from the system
|
||||
intermodule_singleton_helpers::thread_safe_global_map_dependant<ThreadSafeGlobalMap>::remove_old_gmem();
|
||||
//in-place construction of the global map class
|
||||
@@ -254,10 +255,10 @@ class intermodule_singleton_common
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch(...){
|
||||
BOOST_CATCH(...){
|
||||
//
|
||||
throw;
|
||||
}
|
||||
BOOST_RETHROW
|
||||
} BOOST_CATCH_END
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -405,17 +406,17 @@ class intermodule_singleton_impl
|
||||
<ThreadSafeGlobalMap>::find(m_map, typeid(C).name());
|
||||
if(!rcount){
|
||||
C *p = new C;
|
||||
try{
|
||||
BOOST_TRY{
|
||||
ref_count_ptr val(p, 0u);
|
||||
rcount = intermodule_singleton_helpers::thread_safe_global_map_dependant
|
||||
<ThreadSafeGlobalMap>::insert(m_map, typeid(C).name(), val);
|
||||
}
|
||||
catch(...){
|
||||
BOOST_CATCH(...){
|
||||
intermodule_singleton_helpers::thread_safe_global_map_dependant
|
||||
<ThreadSafeGlobalMap>::erase(m_map, typeid(C).name());
|
||||
delete p;
|
||||
throw;
|
||||
}
|
||||
BOOST_RETHROW
|
||||
} BOOST_CATCH_END
|
||||
}
|
||||
//if(Phoenix){
|
||||
std::atexit(&atexit_work);
|
||||
|
||||
Reference in New Issue
Block a user