socket setdefaulttimeout

bryanjugglercryptographer at yahoo.com bryanjugglercryptographer at yahoo.com
Mon Aug 15 16:49:28 EDT 2005


Michael P. Soulier wrote:
> 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?

You mean a Unix-specific signal? If so that would be much less
portable. As for simpler, I'd have to see your code.


-- 
--Bryan




More information about the Python-list mailing list