Created
July 6, 2011 19:01
-
-
Save roxlu/1068050 to your computer and use it in GitHub Desktop.
ofThead blocking does not work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple thread class | |
class MyCustomThread : public ofThread { | |
protected: | |
virtual void threadedFunction() { | |
while(true) { | |
cout << "My own custom thread!" << endl; | |
ofSleepMillis(3000); | |
} | |
} | |
}; | |
// using the thread | |
void testApp::setup(){ | |
// creates a blocking thread (verbose) | |
cout << "Start: blocking thread\n"; | |
my_thread.startThread(true, true); | |
cout << "Stopped: blocking thread\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment