Because the function "run" runs in block.
In ice ,How can I repleace the code
ic->waitForShutdown()
0
marcFloridaAdministrators, ZeroC StaffMarc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications EngineZeroC Staff
There is nothing in Ice that is equivalent to CORBA's run() function. You don't need to call anything special, i.e., just activate your object adapters, and you are done. There is no event loop as all the processing is done by separate threads, meaning that you are free to use the main thread in any way you like.
waitForShutdown() does exactly what the name says: It suspends the caller thread, until somebody calls shutdown(). Other than that, it doesn't do anything, i.e., it is not the entry point to some kind of event loop.
Comments
while(1)
{
if(orb-> work_pending())
orb-> perform_work (500);
else
{
......run myself code .......
}
}
take place the
orb->run();
Because the function "run" runs in block.
In ice ,How can I repleace the code
ic->waitForShutdown()
waitForShutdown() does exactly what the name says: It suspends the caller thread, until somebody calls shutdown(). Other than that, it doesn't do anything, i.e., it is not the entry point to some kind of event loop.
Thanks a lot .