summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/CSD_Strategy/TestInf/AppShutdown.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/performance-tests/CSD_Strategy/TestInf/AppShutdown.h')
-rw-r--r--TAO/performance-tests/CSD_Strategy/TestInf/AppShutdown.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/TAO/performance-tests/CSD_Strategy/TestInf/AppShutdown.h b/TAO/performance-tests/CSD_Strategy/TestInf/AppShutdown.h
new file mode 100644
index 00000000000..7249def17bf
--- /dev/null
+++ b/TAO/performance-tests/CSD_Strategy/TestInf/AppShutdown.h
@@ -0,0 +1,41 @@
+// $Id$
+#ifndef APP_SHUTDOWN_H
+#define APP_SHUTDOWN_H
+
+#include "CSD_PT_TestInf_Export.h"
+#include "OrbShutdownTask.h"
+#include "tao/ORB.h"
+
+class CSD_PT_TestInf_Export AppShutdown
+{
+ public:
+
+ AppShutdown();
+ virtual ~AppShutdown();
+
+ void init(CORBA::ORB_ptr orb,
+ unsigned num_clients);
+
+ void wait ();
+
+ void client_done();
+
+ static AppShutdown* instance ();
+
+ private:
+
+ typedef ACE_SYNCH_MUTEX LockType;
+ typedef ACE_Guard<LockType> GuardType;
+
+ LockType lock_;
+ CORBA::ORB_var orb_;
+ unsigned num_clients_;
+ unsigned num_clients_shutdown_;
+
+ OrbShutdownTask orb_shutdown_task_;
+};
+
+
+#define TheAppShutdown AppShutdown::instance()
+
+#endif