[go: up one dir, main page]

File: forever.cpp

package info (click to toggle)
libcommoncpp2 1.5.1-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,732 kB
  • ctags: 3,544
  • sloc: cpp: 28,089; sh: 9,512; ansic: 1,118; makefile: 319; xml: 5
file content (21 lines) | stat: -rw-r--r-- 240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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() );
 }