diff options
Diffstat (limited to 'lib/TaskMan.cc')
-rw-r--r-- | lib/TaskMan.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc index 97fd1bd..218ce2f 100644 --- a/lib/TaskMan.cc +++ b/lib/TaskMan.cc @@ -120,6 +120,8 @@ void TaskMan::MainLoop() throw (GeneralException) { throw GeneralException("TaskMan: No more task to manage."); } + cerr << "==== TaskMan: main loop.\n"; + no_burst = 0; while (!no_burst) { no_burst = 1; @@ -128,6 +130,7 @@ void TaskMan::MainLoop() throw (GeneralException) { Task * t = *p; if (t->GetState() == TASK_BURST) { + cerr << "==== TaskMan: running burning task \"" << t->GetName() << "\".\n"; t->Run(); /* if the task added some new tasks, we have to rerun the loop */ no_burst = 0; @@ -151,6 +154,8 @@ void TaskMan::MainLoop() throw (GeneralException) { nfds = w4ha.size(); + cerr << "==== TaskMan: polling.\n"; + if (nfds != 0) { int r; vector<w4ha_t>::iterator p; @@ -168,6 +173,7 @@ void TaskMan::MainLoop() throw (GeneralException) { q->fd = 0; q->events = 0; } else { + cerr << "==== TaskMan: adding watch over handle \"" << p->ha->GetName() << "\" for task \"" << p->T->GetName() << "\"\n"; q->fd = p->ha->GetHandle(); q->events = (p->flags & W4_READING ? POLLIN : 0) | (p->flags & W4_WRITING ? POLLOUT : 0); } @@ -231,6 +237,8 @@ void TaskMan::MainLoop() throw (GeneralException) { if ((p->ha->GetHandle() == fd) && (!p->T->IsStopped())) { // We've got one, launch it. bool erased; + + cerr << "==== TaskMan: event over handle \"" << p->ha->GetName() << "\"\n"; erased = false; p->T->Run(); |