[Tutor] Unit testing
Tino Dai
tinoloc at gmail.com
Thu Jun 29 13:28:31 CEST 2006
> Okay, I was bored tonight, so I cooked up an illustration.
Thanks for that!
Here's an example with five stages. Stage 1 takes a string and fills an
> input queue with a series of letters from the string. Stages 2-4 do just
> take a letter off its input queue and move it to its output queue. Stage
> 5 takes a letter off its input queue and then assembles it into the string
> and prints it once complete.
I think that I might be missing something in my understanding of python.
Between the producer and consumer threads, does the consumer end of the
queue sit there and wait for something to come down the queue or is the
consumer wake up after a randompause()? Right now, I have the semaphores as
gatekeepers to each one of the threads. And until something is in the queue,
the thread's semaphore will wait for the semphore to be released by the
previous thread.
-Tino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060629/6a26a8f7/attachment.html
More information about the Tutor
mailing list