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

Unified Diff: src/Thread.cpp

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.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/Thread.h ('k') | test/Thread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Thread.cpp
===================================================================
--- a/src/Thread.cpp
+++ b/src/Thread.cpp
@@ -89,17 +89,17 @@
void Thread::Start()
{
#ifdef WIN32
- thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&CallRun, this, 0, 0);
+ nativeThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&CallRun, this, 0, 0);
#else
- pthread_create(&thread, 0, (void *(*)(void*)) &CallRun, this);
+ pthread_create(&nativeThread, 0, (void *(*)(void*)) &CallRun, this);
#endif
}
void Thread::Join()
{
#ifdef WIN32
- WaitForSingleObject(thread, INFINITE);
+ WaitForSingleObject(nativeThread, INFINITE);
#else
- pthread_join(thread, 0);
+ pthread_join(nativeThread, 0);
#endif
}
« no previous file with comments | « src/Thread.h ('k') | test/Thread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld