How to perform a nonblocking read from a process

rdabane at gmail.com rdabane at gmail.com
Wed Jun 4 02:45:59 EDT 2008


On Jun 3, 7:53 pm, sturlamolden <sturlamol... at yahoo.no> wrote:
> On Jun 4, 3:20 am, rdab... at gmail.com wrote:
>
> > It seems that stdout.readline() is a blocking read and it just gets
> > stuck their..
> > How to fix this ..
>
> Threads are the simplest remedy for blocking i/o.



> Threads are the simplest remedy for blocking i/o.
I've to admit I'm a newbie to this kind of programming...
what if I have to run thousands of these commands...it doesn't make
sense to create
thousands of threads..
Is there a way that above mentioned piece of code be made to worked...





More information about the Python-list mailing list