Changeset 31598 in vbox
- Timestamp:
- Aug 12, 2010 12:56:15 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/EventQueue.h
r31589 r31598 92 92 93 93 BOOL postEvent(Event *event); 94 int processEventQueue( uint32_tcMsTimeout);94 int processEventQueue(RTMSINTERVAL cMsTimeout); 95 95 int interruptEventQueueProcessing(); 96 96 int getSelectFD(); -
trunk/src/VBox/Main/glue/EventQueue.cpp
r31589 r31598 281 281 CFTimeInterval rdTimeout = cMsTimeout == RT_INDEFINITE_WAIT ? 1e10 : (double)cMsTimeout / 1000; 282 282 OSStatus orc = CFRunLoopRunInMode(kCFRunLoopDefaultMode, rdTimeout, true /*returnAfterSourceHandled*/); 283 /** @todo Not entire sure if the poll actually processes more than one message.284 * Feel free to check the sources anyone. */285 283 if (orc == kCFRunLoopRunHandledSource) 286 orc = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.0, false /*returnAfterSourceHandled*/); 284 { 285 OSStatus orc2 = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.0, false /*returnAfterSourceHandled*/); 286 if ( orc2 == kCFRunLoopRunStopped 287 || orc2 == kCFRunLoopRunFinished) 288 orc = orc2; 289 } 287 290 if ( orc == 0 288 291 || orc == kCFRunLoopRunHandledSource) … … 301 304 * @retval VINF_SUCCESS 302 305 * @retval VERR_TIMEOUT 303 * @retval V ERR_INTERRUPTED306 * @retval VINF_INTERRUPTED 304 307 * @retval VERR_INTERNAL_ERROR_4 305 308 * … … 333 336 rc = VERR_TIMEOUT; 334 337 else if (errno == EINTR) 335 rc = V ERR_INTERRUPTED;338 rc = VINF_INTERRUPTED; 336 339 else 337 340 { … … 452 455 * @retval VERR_INTERRUPTED if interruptEventQueueProcessing was called. 453 456 * On Windows will also be returned when WM_QUIT is encountered. 454 * On UNIXy systems this may also be returned when a signal is455 * dispatched on the calling thread.456 457 * On Darwin this may also be returned when the native queue is 457 458 * stopped or destroyed/finished. 458 * @ todo Change this method to use some status other than VERR_INTERRUPTED459 * for indicating harmless interruptions by the system, or some other460 * status for indicating interruptEventQueueProcessing/WM_QUIT. Maybe461 * VINF_INTERRUPTED for system interruption would be best appropriate.459 * @retval VINF_INTERRUPTED if the native system call was interrupted by a 460 * an asynchronous event delivery (signal) or just felt like returning 461 * out of bounds. On darwin it will also be returned if the queue is 462 * stopped. 462 463 */ 463 464 int EventQueue::processEventQueue(RTMSINTERVAL cMsTimeout) … … 535 536 #endif // !VBOX_WITH_XPCOM 536 537 538 Assert(rc != VERR_TIMEOUT || cMsTimeout != RT_INDEFINITE_WAIT); 537 539 return rc; 538 540 } -
trunk/src/VBox/Main/webservice/vboxweb.cpp
r31597 r31598 771 771 772 772 com::EventQueue *pQ = com::EventQueue::getMainEventQueue(); 773 while (1)773 for (;;) 774 774 { 775 775 // we have to process main event queue 776 776 WEBDEBUG(("Pumping COM event queue\n")); 777 777 int vrc = pQ->processEventQueue(RT_INDEFINITE_WAIT); 778 if (RT_FAILURE(vrc) && vrc != VERR_TIMEOUT)778 if (RT_FAILURE(vrc)) 779 779 RTMsgError("processEventQueue -> %Rrc", rc); 780 780 } -
trunk/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp
r29153 r31598 372 372 373 373 if ( rc == VERR_TIMEOUT 374 374 || rc == VERR_INTERRUPTED) 375 375 return 1; 376 376
Note:
See TracChangeset
for help on using the changeset viewer.