Skip to content

Commit

Permalink
call stopThread after threadedFunction so if it's not an infinite loop.
Browse files Browse the repository at this point in the history
Closes #13
  • Loading branch information
arturoc committed Dec 4, 2009
1 parent 66ecd66 commit 0271f5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/ofxThread/src/ofxThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ class ofxThread{
static unsigned int __stdcall thread(void * objPtr){
ofxThread* me = (ofxThread*)objPtr;
me->threadedFunction();
stopThread();
return 0;
}

#else
static void * thread(void * objPtr){
ofxThread* me = (ofxThread*)objPtr;
me->threadedFunction();
stopThread();
return 0;
}
#endif
Expand Down

0 comments on commit 0271f5f

Please sign in to comment.