summaryrefslogtreecommitdiff
path: root/TAO/tao/default_client.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-14 18:21:54 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-14 18:21:54 +0000
commit823735385db12ef7226b9d49555ae8a72e453cfa (patch)
treefdeb489ee30dc1224f635da49ebd6810af9a2c76 /TAO/tao/default_client.cpp
parent921dc188fa100de97f99a4b127dd065de4cc5f02 (diff)
downloadATCD-823735385db12ef7226b9d49555ae8a72e453cfa.tar.gz
ChangeLogTag:Wed Jul 14 13:19:36 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/default_client.cpp')
-rw-r--r--TAO/tao/default_client.cpp37
1 files changed, 36 insertions, 1 deletions
diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp
index 3325ac7a5c2..d9e3afd421a 100644
--- a/TAO/tao/default_client.cpp
+++ b/TAO/tao/default_client.cpp
@@ -12,7 +12,8 @@
ACE_RCSID(tao, default_client, "$Id$")
TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void)
- : profile_lock_type_ (TAO_THREAD_LOCK)
+ : profile_lock_type_ (TAO_THREAD_LOCK),
+ cached_connector_lock_type_ (TAO_THREAD_LOCK)
{
// Use single thread client connection handler
#if defined (TAO_USE_ST_CLIENT_CONNECTION_HANDLER)
@@ -128,6 +129,23 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, char ** argv)
this->transport_mux_strategy_ = TAO_EXCLUSIVE_TMS;
}
}
+
+ else if (ACE_OS::strcasecmp (argv[curarg],
+ "-ORBConnectorLock") == 0)
+ {
+ curarg++;
+ if (curarg < argc)
+ {
+ char *name = argv[curarg];
+
+ if (ACE_OS::strcasecmp (name,
+ "thread") == 0)
+ this->cached_connector_lock_type_ = TAO_THREAD_LOCK;
+ else if (ACE_OS::strcasecmp (name,
+ "null") == 0)
+ this->cached_connector_lock_type_ = TAO_NULL_LOCK;
+ }
+ }
}
return 0;
}
@@ -194,6 +212,23 @@ TAO_Default_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *transp
return ws;
}
+ACE_Lock *
+TAO_Default_Client_Strategy_Factory::create_cached_connector_lock (void)
+{
+ ACE_Lock *the_lock = 0;
+
+ if (this->cached_connector_lock_type_ == TAO_NULL_LOCK)
+ ACE_NEW_RETURN (the_lock,
+ ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX>,
+ 0);
+ else
+ ACE_NEW_RETURN (the_lock,
+ ACE_Lock_Adapter<ACE_SYNCH_MUTEX>,
+ 0);
+
+ return the_lock;
+}
+
// ****************************************************************
ACE_STATIC_SVC_DEFINE (TAO_Default_Client_Strategy_Factory,