11 class Server_Task
: public ACE_Task_Base
14 Server_Task (const std::string
& args
)
17 ~Server_Task () { this->force_shutdown (); }
21 bool initializer
= false;
23 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX
, ace_mon
, this->mutex_
, -1);
26 ACE_ARGV
my_args (args_
.c_str ());
28 // Initialize Server ORB in new thread
29 server_
= std::make_unique
<Server
> (my_args
.argc (), my_args
.argv ());
39 this->force_shutdown (); // servant thread is responsible for shutdown
53 return server_
->init_
;
59 void force_shutdown ()
69 std::unique_ptr
<Server
> server_
;
70 TAO_SYNCH_MUTEX mutex_
;
73 #endif //_SERVER_TASK_