threading and timeouts

Piers Lauder piers at
Sun Nov 28 23:50:52 EST 1999

The responses to my request on how to timeout threads yielded one very
useful module from Phil Mayes :-

This module defines a `timeout_socket' class for connections that can
potentially cause a server to hang.   By sub-classing and inheriting
from standard modules like smtplib, one can override the socket code
and use the original module without modification. See the examples
provided in the __doc__ string for more details.

With Phil's encouragement, I've modified it slightly so that it works on UN*X
systems, and have submitted it to the Vaults of Parnassus.

You can access it directly here:

Thanks Phil!

More information about the Python-list mailing list