draining pipes simultaneously

bockman at virgilio.it bockman at virgilio.it
Wed Mar 5 07:39:48 EST 2008


>
> Inserting delay in the beginning of the loop causes feeling of command
> taking long to start and delay at the end of the loop may cause of
> data loss when both thread became inactive during delay.

time.sleep() pauses ony the thread that executes it, not the
others. And queue objects can hold large amount of data (if you have
the RAM),
so unless your subprocess is outputting data very fast, you should not
have data loss.
Anyway, if it works for you ... :-)

Ciao
-----
FB



More information about the Python-list mailing list