[omniORB] Shutting down problem

Matthew Berry mberry@mweb.co.za
Thu, 15 Mar 2001 11:26:43 +0200


Hi,

My server is has a shutdown method which allows a management utility to
gracefully shutdown the server (and its dependency servers)

In omni280 I used to have use a omni_condition variable as follows:


MyServer_Impl::shutdown()
{
    cond_shutDown.signal();
}

....

int main()
{
    .....
    orb->impl_is_ready(0, 1);

    cond_shutDown.wait();

    ....
}


I have now upgraded to omniORB 3 and was wondering how it is possible to
achieve this. If I used a work_pending/perform_work loop then the CPU is hog
by the process (that the beauty of using the condition).

I could also use orb->shutdown(0), but expect that MyServer_Impl::shutdown
will not return and the management client will get a COMM FAILURE exception.

Any ideas?