File: forever.cpp

package info (click to toggle)
libcommoncpp2 1.8.1-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,300 kB
  • sloc: cpp: 29,221; sh: 10,352; ansic: 1,134; makefile: 238; 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() );
 }