summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp')
-rw-r--r--TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp b/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp
index 7b75c7130ed..7dbf88c5b16 100644
--- a/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp
+++ b/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp
@@ -6,6 +6,7 @@
#include "tao/AnyTypeCode/WrongTransactionA.h"
#include "tao/AnyTypeCode/PolicyA.h"
#include "tao/AnyTypeCode/Any.h"
+#include "tao/AnyTypeCode/Any_Unknown_IDL_Type.h"
#include "tao/AnyTypeCode/BooleanSeqA.h"
#include "tao/AnyTypeCode/OctetSeqA.h"
@@ -290,6 +291,13 @@ TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::WS
int
TAO_AnyTypeCode_Adapter_Impl::Initializer (void)
{
+ // The TAO::Unknown_IDL_Type::lock_i () is a PRIVATE thread unsafe singleton
+ // which we need to initialise before Unknown_IDL_Types are used in a
+ // threaded environment. This singleton is called for every constructed
+ // Unknown_IDL_Type, so just create a throw-a-way from a null typecode.
+ TAO::Unknown_IDL_Type singleton_initaliser (0);
+ ACE_UNUSED_ARG (singleton_initaliser);
+
return ACE_Service_Config::process_directive (
ace_svc_desc_TAO_AnyTypeCode_Adapter_Impl);
}