Error compiling thr_lqueue.cc
Raphael Collet
raph at info.ucl.ac.be
Thu May 17 11:19:34 CEST 2007
Dear Evert,
I am as astounded as you. Your analysis is perfectly correct. This
code doesn't make any sense to me. The problem is that I don't even
know what it is supposed to do...
The author is Denys Duchier. Denys, if you ever read this, can you
please give us a clue? What is it supposed to do? And could you also
explain the idea of the algorithm itself, because this looks very weird
to me. I can fix it if you just give me a few hints.
Cheers,
raph
ti008977 at tiscali.nl wrote:
> Hi all,
>
> Im trying to compile using the microsoft express 2005 compiler.
>
> In thr_lqueue.cc I found this code:
>
> int ThreadQueue::getRunnableNumber()
> {
> ThreadQueueIterator iter(this);
> int ret=0;
> Thread**ptr;
> while (ptr=iter.getNext()) ret=(*ptr)->getRunnableNumber();
> return ret;
> }
>
> ptr can't be converted to iter.getNext(); but *ptr can.
> Then I get stuck at getRunnableNumber(), which is no part of Thread,
> but of ThreadsPool. It might, of course, also be recursive.
>
More information about the mozart-hackers
mailing list