Changeset 26447 in vbox
- Timestamp:
- Feb 11, 2010 5:05:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/vboxweb.cpp
r26409 r26447 60 60 // include generated namespaces table 61 61 #include "vboxwebsrv.nsmap" 62 63 // If this is defined, then thread 1 ONLY performs COM event queue processing 64 // (using RT_INDEFINITE_WAIT to wait for events), and the SOAP queue is processed 65 // on a separate thread. This appears to be broken 66 // as soon as more than one client fires SOAP events at the webservices. 67 // If this is NOT defined, then COM events are only serviced after SOAP event 68 // processing has completed, and both occur on thread 1. 69 70 // #define TEMP_USE_BROKEN_XPCOM_EVENTQUEUE_PROCESSING 62 71 63 72 /**************************************************************************** … … 526 535 g_pSoapQ = new SoapQ(&soap); 527 536 528 // start the SOAP processing thread529 530 537 for (uint64_t i = 1; 531 538 ; … … 545 552 WebLog("Request %llu on socket %d queued for processing (%d items on Q)\n", i, s, cItemsOnQ); 546 553 554 #ifndef TEMP_USE_BROKEN_XPCOM_EVENTQUEUE_PROCESSING 547 555 // process the COM event Q 548 556 int vrc = com::EventQueue::getMainEventQueue()->processEventQueue(0); 557 #endif 549 558 } 550 559 } … … 552 561 } 553 562 563 #ifdef TEMP_USE_BROKEN_XPCOM_EVENTQUEUE_PROCESSING 554 564 /** 555 565 * Thread function for the "queue pumper" thread started from main(). This implements … … 557 567 * SOAP queue worker threads. 558 568 */ 559 // int fntQPumper(RTTHREAD ThreadSelf, void *pvUser) 560 // { 561 // // store a log prefix for this thread 562 // g_mapThreads[RTThreadSelf()] = "[ P ]"; 563 // 564 // doQueuesLoop(); 565 // 566 // return 0; 567 // } 569 int fntQPumper(RTTHREAD ThreadSelf, void *pvUser) 570 { 571 // store a log prefix for this thread 572 g_mapThreads[RTThreadSelf()] = "[ P ]"; 573 574 doQueuesLoop(); 575 576 return 0; 577 } 578 #endif 568 579 569 580 /** … … 720 731 g_pSessionsLockHandle = new util::RWLockHandle(util::LOCKCLASS_OBJECTSTATE); 721 732 733 #ifdef TEMP_USE_BROKEN_XPCOM_EVENTQUEUE_PROCESSING 722 734 // SOAP queue pumper thread 723 // RTTHREAD tQPumper; 724 // if (RTThreadCreate(&tQPumper, 725 // fntQPumper, 726 // NULL, // pvUser 727 // 0, // cbStack (default) 728 // RTTHREADTYPE_MAIN_WORKER, 729 // 0, // flags 730 // "SoapQPumper")) 731 // { 732 // RTStrmPrintf(g_pStdErr, "[!] Cannot start SOAP queue pumper thread\n"); 733 // exit(1); 734 // } 735 RTTHREAD tQPumper; 736 if (RTThreadCreate(&tQPumper, 737 fntQPumper, 738 NULL, // pvUser 739 0, // cbStack (default) 740 RTTHREADTYPE_MAIN_WORKER, 741 0, // flags 742 "SoapQPumper")) 743 { 744 RTStrmPrintf(g_pStdErr, "[!] Cannot start SOAP queue pumper thread\n"); 745 exit(1); 746 } 747 #endif 735 748 736 749 // watchdog thread … … 752 765 } 753 766 767 #ifdef TEMP_USE_BROKEN_XPCOM_EVENTQUEUE_PROCESSING 768 com::EventQueue *pQ = com::EventQueue::getMainEventQueue(); 769 while (1) 770 { 771 // we have to process main event queue 772 WebLog("Pumping COM event queue\n"); 773 int vrc = pQ->processEventQueue(RT_INDEFINITE_WAIT); 774 if (FAILED(vrc)) 775 com::GluePrintRCMessage(vrc); 776 } 777 #else 754 778 doQueuesLoop(); 755 756 // while (1) 757 // { 758 // // we have to process main event queue 759 // WebLog("Pumping COM event queue\n"); 760 // int vrc = com::EventQueue::getMainEventQueue()->processEventQueue(RT_INDEFINITE_WAIT); 761 // } 779 #endif 762 780 763 781 com::Shutdown();
Note:
See TracChangeset
for help on using the changeset viewer.