 Issue 10026001:
  Cross-platform thread primitives  (Closed)
    
  
    Issue 10026001:
  Cross-platform thread primitives  (Closed) 
  | Left: | ||
| Right: | 
| OLD | NEW | 
|---|---|
| 1 #ifndef ADBLOCKPLUS_THREAD_H | 1 #ifndef ADBLOCKPLUS_THREAD_H | 
| 2 #define ADBLOCKPLUS_THREAD_H | 2 #define ADBLOCKPLUS_THREAD_H | 
| 3 | 3 | 
| 4 #ifdef WIN32 | 4 #ifdef WIN32 | 
| 5 #include <windows.h> | 5 #include <windows.h> | 
| 6 #else | 6 #else | 
| 7 #include <pthread.h> | 7 #include <pthread.h> | 
| 8 #endif | 8 #endif | 
| 9 | 9 | 
| 10 namespace AdblockPlus | 10 namespace AdblockPlus | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 #endif | 43 #endif | 
| 44 }; | 44 }; | 
| 45 | 45 | 
| 46 virtual ~Thread(); | 46 virtual ~Thread(); | 
| 47 virtual void Run() = 0; | 47 virtual void Run() = 0; | 
| 48 void Start(); | 48 void Start(); | 
| 49 void Join(); | 49 void Join(); | 
| 50 | 50 | 
| 51 private: | 51 private: | 
| 52 #ifdef WIN32 | 52 #ifdef WIN32 | 
| 53 HANDLE thread; | 53 HANDLE nativeThread; | 
| 54 #else | 54 #else | 
| 55 pthread_t thread; | 55 pthread_t nativeThread; | 
| 56 #endif | 56 #endif | 
| 57 }; | 57 }; | 
| 58 } | 58 } | 
| 59 | 59 | 
| 60 #endif | 60 #endif | 
| OLD | NEW |