diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-25 15:13:44 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-25 15:13:44 +0000 |
commit | 9d4d729a1d1ae2400fe05278dcbca128bbe7c07f (patch) | |
tree | c33b9f94a8ecb038efe5423d741a0d47cf4ebfb3 /ace/Singleton.h | |
parent | 5e7917b86f42ef399c33b44897f486d20ae10841 (diff) | |
download | ATCD-9d4d729a1d1ae2400fe05278dcbca128bbe7c07f.tar.gz |
added comment about best ACE_LOCK types to use
Diffstat (limited to 'ace/Singleton.h')
-rw-r--r-- | ace/Singleton.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ace/Singleton.h b/ace/Singleton.h index 7b40bd353d5..2e108f1ed2d 100644 --- a/ace/Singleton.h +++ b/ace/Singleton.h @@ -39,6 +39,18 @@ class ACE_Singleton : public ACE_Cleanup // scheme to work, a (static) <cleanup> function must be // provided. <ACE_Singleton> provides one so that TYPE doesn't // need to. + // + // NOTE: the best types to use for ACE_LOCK are + // ACE_Recursive_Thread_Mutex and ACE_Null_Mutex. + // ACE_Recursive_Thread_Mutex should be used in multi-threaded + // programs in which it is possible for more than one thread to + // access the <ACE_Singleton<TYPE, ACE_LOCK>> instance. + // ACE_Null_Mutex can be used otherwise. The reason that these + // types of locks are best has to do with their allocation by + // the ACE_Object_Manager. Single ACE_Recursive_Thread_Mutex + // and ACE_Null_Mutex instances are used for all ACE_Singleton + // instantiations. However, other types of locks are allocated + // per ACE_Singleton instantiation. { public: static TYPE *instance (void); |