Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-19-2004
level level is offline
Registered User
 
 
Join Date: Feb 2004
Location: China
Posts: 71
about waitForShutdown

communicator->waitForShutdown();

Are there the same function codes can take place?
Reply With Quote
  #2 (permalink)  
Old 04-19-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Sorry, but I do not understand the question.
Reply With Quote
  #3 (permalink)  
Old 04-19-2004
level level is offline
Registered User
 
 
Join Date: Feb 2004
Location: China
Posts: 71
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()
Reply With Quote
  #4 (permalink)  
Old 04-19-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
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.
Reply With Quote
  #5 (permalink)  
Old 04-19-2004
level level is offline
Registered User
 
 
Join Date: Feb 2004
Location: China
Posts: 71
I see
Thanks a lot .
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IceGrid + waitForShutdown without Ice::Application -- doesn't work in C++ mefoster Help Center 5 12-04-2006 01:41 PM


All times are GMT -4. The time now is 11:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.