Runnable::~Runnable(void) {
#ifdef DEBUG
cerr << __FILE__ << "(" << __LINE__ << ")"
- << ": destructor(this = " << this << ")"
- << endl;
+ << ": destructor(this = " << this << ")." << endl;
#endif // DEBUG
}
Runnable::Runnable(void): _thread(NULL), _stop(false) {
#ifdef DEBUG
cerr << __FILE__ << "(" << __LINE__ << ")"
- << ": constructor." << endl;
+ << ": constructor(this = " << this << ")." << endl;
#endif // DEBUG
}
cerr << __FILE__ << "(" << __LINE__ << ")"
<< ": static_run(runner = " << runner << ")" << endl;
#endif // DEBUG
+ // Corre tarea.
runner->real_run();
+ // Manda señal de tarea finalizada
runner->_finished();
delete runner;
}
// finalizar, pasandole el puntero al objeto.
_thread = Glib::Thread::create(
SigC::bind<Runnable*>(SigC::slot(&Runnable::static_run), this),
- false);//true);
+ false);
// Si no corremos la tarea normalmente.
} else {
real_run();