Archived
This forum has been archived. Please start a new discussion on GitHub.
about waitForShutdown
in Help Center
communicator->waitForShutdown();
Are there the same function codes can take place?
Are there the same function codes can take place?
0
Comments
-
Sorry, but I do not understand the question.0
-
In corba ,we use
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()0 -
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.0 -
I see
Thanks a lot .0