Emeric Vigier | 2f62582 | 2012-08-06 11:09:52 -0400 | [diff] [blame] | 1 | #include <cc++/thread.h> |
2 | using namespace ost; | ||||
3 | |||||
4 | class Foo : public Thread | ||||
5 | { | ||||
6 | void run() { exit(); }; | ||||
7 | }; | ||||
8 | |||||
9 | int main() | ||||
10 | { | ||||
11 | Foo *f = new Foo(); | ||||
12 | f->start(); | ||||
13 | |||||
14 | // Endless!? why? | ||||
15 | do { | ||||
16 | Thread::sleep( 1000 ); | ||||
17 | } | ||||
18 | while( f->isRunning() ); | ||||
19 | } | ||||
20 |