File: forever.cpp

package info (click to toggle)
libcommoncpp2 1.8.1-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,272 kB
  • ctags: 4,532
  • sloc: cpp: 29,219; sh: 10,352; ansic: 1,134; makefile: 232; 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() );
 }