An improvement to Queue

Aahz Maruch aahz at panix.com
Fri Feb 1 10:37:46 EST 2002


In article <Xns91A85CFFB7ED2michaelrcpcouk at 194.238.50.13>,
Michael Abbott  <michael at rcp.co.uk> wrote:
>aahz at panix.com (Aahz Maruch) wrote in news:a3ccif$rls$1 at panix2.panix.com:
>>
>> What I still don't get is why you're waiting on an event rather than on
>> data.  It seems pointless.  Just have the worker thread grab data and
>> process it.
> 
>The worker thread has other things on its mind: when it does a job, it 
>wants the whole job fully set up and ready to go.

You are contradicting yourself.  In another post, you say:

>I'm not putting incomplete commands in the queue.  However, the consumer is
>in a position to merge multiple commands together, and I'd like it to have
>the option.

>From the programming point of view, if you're sending an incomplete job
to the worker thread, that's an incomplete command.  Accumulate enough
work in an intermediary pipeline to make a whole job.
-- 
                      --- Aahz  <*>  (Copyright 2002 by aahz at pobox.com)

Hugs and backrubs -- I break Rule 6                 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista   

"The more you drive, the less intelligent you are."  --_Repo Man_



More information about the Python-list mailing list