Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / CSD_Strategy_Tests / TP_Common / AppShutdown.h
blobbbc8ba0cd900c094db550e30a1dcee24556a4c7b
1 #ifndef APP_SHUTDOWN_H
2 #define APP_SHUTDOWN_H
4 #include "CSD_TP_Test_Export.h"
5 #include "OrbShutdownTask.h"
6 #include "tao/ORB.h"
8 class CSD_TP_Test_Export AppShutdown
10 public:
11 AppShutdown();
12 virtual ~AppShutdown();
14 void init(CORBA::ORB_ptr orb,
15 unsigned num_clients);
17 void wait ();
19 void client_done();
21 static AppShutdown* instance ();
23 private:
24 CORBA::ORB_var orb_;
25 unsigned num_clients_;
26 ACE_Atomic_Op <TAO_SYNCH_MUTEX, unsigned> num_clients_shutdown_;
28 OrbShutdownTask orb_shutdown_task_;
31 #define TheAppShutdown AppShutdown::instance()
33 #endif