Alarms in threads - how to get/mimic?

Aahz Maruch aahz at
Sat Dec 16 10:19:52 EST 2000

In article <Pine.LNX.4.21.0012160248520.7483-100000 at>,
Luca de Alfaro  <dealfaro at> wrote:
>I am trying to write a multi-threaded program to read web pages.  The
>program spawns (say) 10 threads, assigning to each thread a file to
>read with the ftp or http protocol; each thread reads it, and returns
>the info.
>The problem is that the threads sometimes hang for a very long time
>waiting for a connection (httplib seems to have very long timeouts??),
>whereas instead I don't care for the answer if it comes later than
>(say) a few seconds.

httplib does not timeout in its default state; the current best solution
is to download
                      --- Aahz (Copyright 2000 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

"It's 106 miles to Chicago.  We have a full tank of gas, a half-pack of
cigarettes, it's dark, and we're wearing sunglasses."  "Hit it."

More information about the Python-list mailing list