Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/Thread.h

Issue 10026001: Cross-platform thread primitives (Closed)
Patch Set: Renamed thread to nativeThread, made the tests more robust Created April 3, 2013, 4:23 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/Thread.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | src/Thread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld