Rosetta  2019.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Macros | Functions
threadsafe_creation.hh File Reference
#include <utility/pointer/owning_ptr.hh>
#include <boost/function.hpp>
#include <map>

Namespaces

 utility
 unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 0.
 
 utility::thread
 

Macros

#define SAFELY_PASS_MUTEX(X)   false
 
#define SAFELY_PASS_THREADSAFETY_BOOL(X)   false
 

Functions

template<class T >
void utility::thread::safely_create_singleton (boost::function< T *() > creation_func, T *&instance)
 Safely instantiate a singleton class in a (possibly) multithreaded context. More...
 
template<class T >
bool utility::thread::safely_determine_whether_singleton_exists (T *const &instance)
 Given a pointer, determine whether the singleton to which it points has already been created. More...
 
template<class T >
void utility::thread::safely_create_load_once_object_by_OP (boost::function< utility::pointer::shared_ptr< T >() > creation_func, utility::pointer::shared_ptr< T > &instance, bool const , bool const )
 Safely instantiate a singleton class in a (possibly) multithreaded context. This version works with shared_ptrs. More...
 
template<class T , class K >
utility::pointer::shared_ptr< Tutility::thread::safely_check_map_for_key_and_insert_if_absent (typename boost::function< utility::pointer::shared_ptr< T >() > builder, bool const , K const &tname, typename std::map< K, utility::pointer::shared_ptr< T > > &tmap)
 Check for a string map key in a map of string->owning pointers. If the key is not present, create an object by owning pointer and insert it in the map with the given key. More...
 

Macro Definition Documentation

#define SAFELY_PASS_MUTEX (   X)    false
#define SAFELY_PASS_THREADSAFETY_BOOL (   X)    false