Subject: Re: [PATCH] Timeout support for blocking API

Re: [PATCH] Timeout support for blocking API

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 24 Apr 2010 20:38:39 +0200 (CEST)

On Tue, 16 Feb 2010, Jan Van Boghout wrote:

> These patches are a proposal for a user-customizable timeout value when
> interacting with sessions in blocking mode. See the following comment in
> session.c: /* Note that this COULD be made to use a timeout that perhaps
> could be customizable by the app or something... */

I'd like to come back to the discussion about this patch. See
http://www.libssh2.org/mail/libssh2-devel-archive-2010-02/0073.shtml for the
original post.

I think apps could use a way to set a maximum time that libssh2 would wait.

One question is what the given time is, like is it total time for the entire
function call, or just maximum time for a single select() call (which seems a
bit strange to set from an app's viewpoint). Another question is if Jan Van
Boghout's patch actually works, as I would suspect that just having select()
return will in many cases just have libssh2 call the same function again and
it'll loop back into the select() really quickly...

Thoughts?

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-04-24