> Date: Fri, 01 May 2015 11:01:15 +0200 > From: Gisle Vanem <[email protected]> > CC: [email protected] > > Eli Zaretskii wrote: > > > I don't see any threads created by run_with_timeout on my system, when > > I download the above URL. In fact, if I set a breakpoint in > > run_with_timeout, the only 2 calls to it during the whole download are > > from getaddrinfo_with_timeout and from connect_with_timeout, both with > > timeout of zero, which calls the function synchronously, both on > > Windows and on Posix hosts. > > > > So I guess I don't see what Gisle describes as "separate thread for > > HTTPS reads". What am I missing? > > It depends on what 'opt.read_timeout' is globally. So > don't use "read-timeout = 0" in your wgetrc.
I don't have any such settings in my ~/.wgetrc or in system-global wgetrc, and the value of opt.read_timeout is the default 900 if I look at it in the debugger. The reason seems to be different: my reading of gnutls.c is that when Wget use GnuTLS for HTTPS connections, it indeed doesn't call run_with_timeout. Instead, wgnutls_read_timeout calls 'select' with the timeout value, so the thread-launching code in run_with_timeout is not used in this case. By contrast, the equivalent code in openssl.c does call run_with_timeout. So perhaps you should try building Wget with GnuTLS, and see if you get any perceptible speed-up.
