summaryrefslogtreecommitdiff
path: root/ace/Singleton.h
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-05-18 15:44:48 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-05-18 15:44:48 +0000
commit2968b05941a31f0c4956b999c335c03c5adaba40 (patch)
tree7dd1efdb810ea9e5c063b803ad0d4508549285b8 /ace/Singleton.h
parent03e988f9e2090009bd937436c41dbd76e528be70 (diff)
downloadATCD-2968b05941a31f0c4956b999c335c03c5adaba40.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Singleton.h')
-rw-r--r--ace/Singleton.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/ace/Singleton.h b/ace/Singleton.h
index 593a2f371ca..0c4a322735d 100644
--- a/ace/Singleton.h
+++ b/ace/Singleton.h
@@ -12,7 +12,7 @@
// = DESCRIPTION
//
// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu) and Douglas C. Schmidt
+// Tim Harrison (harrison@cs.wustl.edu), Douglas C. Schmidt, Chris Lahey, and Rich Christy
//
// ============================================================================
@@ -56,7 +56,7 @@ protected:
// Get reference to Singleton lock;
};
-template <class TYPE>
+template <class TYPE, class LOCK>
class ACE_TSS_Singleton
// = TITLE
// A Thread Specific Storage Singleton Adapter.
@@ -73,10 +73,13 @@ public:
// Dump the state of the object.
protected:
- //#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- static ACE_TSS<TYPE> *tss_instance_;
+#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
+ static ACE_TSS<TYPE> *instance_;
// Pointer to the Singleton instance.
- // #endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
+
+ static LOCK ace_singleton_lock_;
+ // Lock the creation of the singleton.
+#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
};
#if defined (__ACE_INLINE__)