I've hit a bit of a problem with thread debugging.

It seems to be more philosophical than technical per se....

I'm sending it to the list so that people can tell me that I'm dumb
and there's an easy way to do it or Paul can muse on it as he produces
the next versions.


The problem is with debugging producer-consumer situations.

Paperclips has a classic P-V setup. The V is a pool of threads
accepting connections (from the P) over a queue.

The V's sit on the queue with:

   queue.wait()

The P call's:

    queue.notify()

when it has added something to the queue.


The problem is though that when the call  

   P:queue.notify() 

is made it's impossible to tell which V picked it up (only one does
as per spec).



There, I told you it was philosophical.

Anyway, if this can't be done Paul may want (is that the right word?)
to have a bug-report which I'm happy to provide.

But maybe someone can think of a way of doing it.



Nic

Reply via email to