summaryrefslogtreecommitdiff
path: root/ace/Singleton.h
diff options
context:
space:
mode:
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__)