Changeset 30609 in vbox for trunk/src/VBox/Main/webservice/vboxweb.cpp
- Timestamp:
- Jul 5, 2010 12:43:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/vboxweb.cpp
r30607 r30609 129 129 ULONG64 g_iMaxManagedObjectID = 0; 130 130 ULONG64 g_cManagedObjects = 0; 131 132 // this mutex protects g_mapThreads 133 util::RWLockHandle *g_pThreadsLockHandle; 131 134 132 135 // Threads map, so we can quickly map an RTTHREAD struct to a logger prefix … … 326 329 m_soap); 327 330 m_llAllThreads.push_back(pst); 331 util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS); 328 332 g_mapThreads[pst->m_pThread] = com::Utf8StrFmt("[%3u]", pst->m_u); 329 333 ++m_cIdleThreads; … … 455 459 456 460 const char *pcszPrefix = "[ ]"; 461 util::AutoReadLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS); 457 462 ThreadsMap::iterator it = g_mapThreads.find(RTThreadSelf()); 458 463 if (it != g_mapThreads.end()) 459 464 pcszPrefix = it->second.c_str(); 465 thrLock.release(); 460 466 461 467 // terminal … … 557 563 { 558 564 // store a log prefix for this thread 565 util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS); 559 566 g_mapThreads[RTThreadSelf()] = "[ P ]"; 567 thrLock.release(); 560 568 561 569 doQueuesLoop(); … … 701 709 g_pAuthLibLockHandle = new util::WriteLockHandle(util::LOCKCLASS_WEBSERVICE); 702 710 g_pSessionsLockHandle = new util::WriteLockHandle(util::LOCKCLASS_WEBSERVICE); 711 g_pThreadsLockHandle = new util::RWLockHandle(util::LOCKCLASS_OBJECTSTATE); 703 712 704 713 // SOAP queue pumper thread … … 765 774 { 766 775 // store a log prefix for this thread 776 util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS); 767 777 g_mapThreads[RTThreadSelf()] = "[W ]"; 778 thrLock.release(); 768 779 769 780 WEBDEBUG(("Watchdog thread started\n"));
Note:
See TracChangeset
for help on using the changeset viewer.