Changeset 26397 in vbox for trunk/src/VBox/Main
- Timestamp:
- Feb 9, 2010 6:44:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/vboxweb.cpp
r26396 r26397 102 102 unsigned int g_uBindToPort = 18083; // port 103 103 unsigned int g_uBacklog = 100; // backlog = max queue size for requests 104 unsigned int g_cWorkerThreads = 10; // no. of worker threads 104 105 105 106 bool g_fVerbose = false; // be verbose … … 283 284 pst->pQ = this; 284 285 pst->soap = soap_copy(pSoap); 285 RTThreadCreate(&pst->pThread, 286 fntSoapQueue, 287 pst, // pvUser 288 0, // cbStack, 289 RTTHREADTYPE_MAIN_HEAVY_WORKER, 290 0, 291 "SoapQWorker"); 286 if (!RT_SUCCESS(RTThreadCreate(&pst->pThread, 287 fntSoapQueue, 288 pst, // pvUser 289 0, // cbStack, 290 RTTHREADTYPE_MAIN_HEAVY_WORKER, 291 0, 292 "SoapQWorker"))) 293 { 294 RTStrmPrintf(g_pStdErr, "[!] Cannot start worker thread %d\n", pst->u); 295 exit(1); 296 } 297 292 298 m_llAllThreads.push_back(pst); 293 299 ++m_cIdleThreads; … … 397 403 pst->soap->socket = pst->pQ->get(); 398 404 399 WebLog("T%d handles connection from IP=%lu.%lu.%lu.%lu socket=%d (%d thr idle)\n",405 WebLog("T%d handles connection from IP=%lu.%lu.%lu.%lu socket=%d (%d threads idle)\n", 400 406 pst->u, 401 407 (pst->soap->ip>>24)&0xFF, … … 424 430 * worker threads. 425 431 */ 426 void beginProcessing( size_t cThreads)432 void beginProcessing() 427 433 { 428 434 // set up gSOAP … … 448 454 449 455 // initialize thread queue, mutex and eventsem, create worker threads 450 SoapQ soapq( cThreads, &soap);456 SoapQ soapq(g_cWorkerThreads, &soap); 451 457 452 458 for (uint64_t i = 1; … … 487 493 { 488 494 int rc; 489 490 uint32_t cWorkerThreads = 5;491 495 492 496 // intialize runtime … … 536 540 537 541 case 'T': 538 cWorkerThreads = ValueUnion.u32;542 g_cWorkerThreads = ValueUnion.u32; 539 543 break; 540 544 … … 643 647 } 644 648 645 beginProcessing( cWorkerThreads);649 beginProcessing(); 646 650 647 651 com::Shutdown();
Note:
See TracChangeset
for help on using the changeset viewer.