[Python-Dev] Time-out in URL Open

Nick Craig-Wood nick at craig-wood.com
Wed Jul 5 19:57:33 CEST 2006


Alex Martelli <aleaxit at gmail.com> wrote:
>  What about doing it with a per-thread-timeout in TLS (overriding the
>  global one if a thread does have it set in its TLS)?  Not as clean,
>  but perhaps far easier to implement than patching dozens of
>  modules/functions/classes to provide timeout= options everywhere...

Yes please!

I wrote a sketch of a module which did this on c.l.py recently

  http://groups.google.com/group/comp.lang.python/browse_thread/thread/d897c00b67cadca5/fd2ceb4e014de7ce?lnk=st&q=TimeoutError&rnum=2&hl=en#fd2ceb4e014de7ce

It would be much better if it had help from the core though.

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick


More information about the Python-Dev mailing list