requests.{get,post} timeout

Marko Rauhamaa marko at pacujo.net
Wed Aug 23 14:00:25 EDT 2017


Chris Angelico <rosuav at gmail.com>:

> What I said was that you don't need threading or alarms because most
> of the time you can let the user use SIGINT. And without the (utterly
> totally useless) threading that you have here, it works flawlessly:
> Ctrl-C instantly breaks the recv call.

Oh, if you give up threading (which I commend you for), problems
evaporate.

So just use async if that's your cup of tea, or nonblocking I/O and
select.epoll(), which is my favorite.


Marko



More information about the Python-list mailing list