Changeset 2309

Show
Ignore:
Timestamp:
03/09/10 15:33:58 (5 months ago)
Author:
gm78
Message:

The number of data loading threads for KML data has been upped to 4.

Location:
FalconView/trunk/public/fvw_core/GeodataDataSources
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FalconView/trunk/public/fvw_core/GeodataDataSources/KMLDataLoader.cpp

    r2277 r2309  
    2828   ::InitializeCriticalSection(&m_RequestQueueCs); 
    2929 
    30    // start data load request handler 
    31    m_hThread = (HANDLE)_beginthreadex(NULL, // Ignored. Must be NULL. 
    32       0,                         // Ignored.  
    33       &CKMLDataLoader::KMLResourceLoadThread,   // application-defined function 
    34       static_cast<LPVOID>(this),    // 32-bit parameter value passed to the thread 
    35       CREATE_SUSPENDED,           // Specifies flags that control the creation of the thread 
    36       &m_uThreadId);                    // 32-bit variable that receives the thread identifier 
    37  
    3830   m_TerminateThreadEvent = ::CreateEvent(NULL, FALSE, FALSE, L""); 
    3931   m_hThreadTerminatedEvent = ::CreateEvent(NULL, FALSE, FALSE, L""); 
    4032 
    41    ::ResumeThread(m_hThread); 
     33   // start data load request handlers 
     34   for (int i=0; i<NUM_DATA_LOADING_THREADS; i++) 
     35   { 
     36      m_hThread[i] = (HANDLE)_beginthreadex(NULL,   // Ignored. Must be NULL. 
     37         0,                         // Ignored.  
     38         &CKMLDataLoader::KMLResourceLoadThread,    // application-defined function 
     39         static_cast<LPVOID>(this), // 32-bit parameter value passed to the thread 
     40         CREATE_SUSPENDED,            // Specifies flags that control the creation of the thread 
     41         &m_uThreadId);                 // 32-bit variable that receives the thread identifier 
     42 
     43      ::ResumeThread(m_hThread[i]); 
     44   } 
    4245} 
    4346 
  • FalconView/trunk/public/fvw_core/GeodataDataSources/KMLDataLoader.h

    r2277 r2309  
    55 
    66class CKMLResource; 
     7 
     8#define NUM_DATA_LOADING_THREADS 4 
    79 
    810class CKMLDataLoader 
     
    1517   HANDLE m_hRequestQueueSemaphore; 
    1618   CRITICAL_SECTION m_RequestQueueCs; 
    17    HANDLE m_hThread; 
     19   HANDLE m_hThread[NUM_DATA_LOADING_THREADS]; 
    1820   UINT m_uThreadId; 
    1921   HANDLE m_TerminateThreadEvent;