socket setdefaulttimeout

Michael P. Soulier msoulier at digitaltorque.ca
Mon Aug 15 12:17:00 EDT 2005


On 13/08/05 Bryan Olson said:

> The seperate thread-or-process trick should work. Start a deamon
> thread to do the gethostbyname, and have the main thread give up
> on the check if the deamon thread doesn't report (via a lock or
> another socket) within, say, 8 seconds.

Wouldn't an alarm be much simpler than a whole thread just for this?

Mike

-- 
Michael P. Soulier <msoulier at digitaltorque.ca>
"Those who would give up esential liberty for temporary safety deserve
neither liberty nor safety." --Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050815/edb7c6ea/attachment.sig>


More information about the Python-list mailing list