Exemplo n.º 1
0
 void run() {
   while(!count->isPaused()) {
     ++number;
     {
       ostringstream os;
       os << *this << " Total: "
          << count->increment() << endl;
       display->output(os);
     }
     Thread::sleep(100);
   }
   waitingForCancel = true;
   while(!count->isCanceled()) // Hold here...
     Thread::sleep(100);
   ostringstream os;
   os << "Terminating " << *this << endl;
   display->output(os);
 }
	void run() {
		while(!tlv->isCanceled()) {
			tlv->increment();
			cout << *this << endl;
		}
	}