Archived

This forum has been archived. Please start a new discussion on GitHub.

about waitForShutdown

communicator->waitForShutdown();

Are there the same function codes can take place?

Comments

  • marc
    marc Florida
    Sorry, but I do not understand the question.
  • 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()
  • marc
    marc Florida
    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.
  • I see
    Thanks a lot .