File: forever.cpp

package info (click to toggle)
libcommoncpp2 1.7.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,060 kB
  • ctags: 3,614
  • sloc: cpp: 27,934; sh: 9,842; ansic: 1,123; makefile: 228; xml: 5
file content (20 lines) | stat: -rw-r--r-- 237 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <cc++/thread.h>
using namespace ost;

class Foo : public Thread
 {
 void run() { exit(); };
 };

int main()
 {
 Foo *f = new Foo();
 f->start();

 // Endless!? why?
 do {
 Thread::sleep( 1000 );
 }
 while( f->isRunning() );
 }