Home | Trees | Indices | Help |
---|
|
object --+ | ??.instance --+ | SingletonBase_T_basic_datacache_WriteableCacheableDataFactory_T
SingletonBase is meant to serve as a base class for singleton classes in Rosetta handling the initialization of the singleton in a thread-safe way. The derived class must a) implement a private, static function: T * create_singleton_instance() so that the SingletonBase class can invoke this function, and b) declare the SingletonBase class to be a friend, so that it can invoke this function The .cc file in which the derived singleton must be put will need to include the definitions for the two static data members, instance_ and singleton_mutex_.
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
WriteableCacheableDataFactory : |
|
|
|||
__instance_size__ = 32
|
|
|||
Inherited from |
|
__init__( (object)arg1) -> None : C++ signature : void __init__(_object*)
|
helper for pickle
|
Safely instantiate a singleton class in a (possibly) multithreaded context. In the non-multithreaded case, this simply checks the singleton's instance member; in the multithreaded case, it checks the instance member, then it obtains the singleton's instance-creation mutex, then it checks the instance member again, to ensure that no other thread has already created the instance, it creates the instance, and then it releases the mutex. C++ signature : basic::datacache::WriteableCacheableDataFactory* get_instance()
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat Jun 6 00:11:01 2015 | http://epydoc.sourceforge.net |