X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/212f9ae5dc8899bab8b23ed13d81c28c510db3c3..289cd57714db01c97f3fa7cb65efedf30114919f:/Server/src/runnable.cpp?ds=sidebyside diff --git a/Server/src/runnable.cpp b/Server/src/runnable.cpp index 7079143..9587fd9 100644 --- a/Server/src/runnable.cpp +++ b/Server/src/runnable.cpp @@ -41,15 +41,14 @@ namespace Server { 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 } @@ -58,7 +57,9 @@ void Runnable::static_run(Runnable* runner) { 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; } @@ -74,7 +75,7 @@ void Runnable::run(bool detach) { // finalizar, pasandole el puntero al objeto. _thread = Glib::Thread::create( SigC::bind(SigC::slot(&Runnable::static_run), this), - false);//true); + false); // Si no corremos la tarea normalmente. } else { real_run();