curl / Mailing Lists / curl-library / Single Mail


Re: Blocking select

From: Daniel Stenberg <>
Date: Tue, 24 Jul 2018 10:05:17 +0200 (CEST)

On Fri, 20 Jul 2018, Christian Schmitz wrote:

> In select.c
> ptimeout = (timeout_ms < 0) ? NULL : &pending_tv;
> I just have a problem with app which blocks.
> So I wonder if it is a good idea to have select block forever!?

That's the underlying select()-wrapper function. The *user* of that function
should however rarely actually pass in a negative timeout there.

> Would it not be better if it defaults to 0.1 second timeout?
> Than events like progress would fire properly and you have the chance to cancel?

Can you figure out how you end up actually waiting "forever" there?

Received on 2018-07-24