Article View: borland.public.cppbuilder.internet.socket
Article #81Re: TNMHTTP vs. TIdHTTP
From: Carlos Moreno
Date: Tue, 22 Apr 2008 02:31
Date: Tue, 22 Apr 2008 02:31
33 lines
2257 bytes
2257 bytes
>> The HTTP control is running on a separate thread --- how >> come it blocks the entire GUI? > >TIdHTTP does not. None of its operations are running in the main thread, so >there is nothing to block. So it has to be your own code that is being >called by Synchronize() that is doing something it should not be doing, and >thus blocking the main thread. This sounds reasonable, of course. The puzzling aspect is that it did not behave this way when using TNMHTTP; the very only thing I changed was this (TNMHTTP replaced by TIdHTTP); nothing else in the application changed. (well, several lines changed in the code that downloads the content, since the syntax and interface for TIdHTTP changes with respect to TNMHTTP --- but the changes are absolutely confined to this one file; nothing changed in the rest of the application) I just tried to see if it could be the file (TFileStream) passed to TIdHTTP::Get to indicate where to put the downloaded content (which is the one prominent difference w.r.t. TNMHTTP); I added a random component to the file name, in case it could be that the same file was downloaded from multiple places concurrently. Did not change the behaviour. Anyway, will continue to think about this, and look for possible suspects! Thanks, Carlos --
Technical Details
Message-ID:
<480d4e0d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!217.73.144.45.MISMATCH!feeder2.ecngs.de!ecngs!feeder.ecngs.de!news.isoc.lu!newsgroups.borland.com!not-for-mailReferences:
<480d16b3$1@newsgroups.borland.com> <480d2d9c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b9c5ec9c3a621e4 X-Google-Attributes: gid11508e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Carlos Moreno" <moreno_h3gd@mochima.com> Sender: "Carlos Moreno" <moreno_h3gd@mochima.com> Reply-To: "Carlos Moreno" <moreno_h3gd@mochima.com> Subject: Re: TNMHTTP vs. TIdHTTP Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 67.142.130.37 References: <480d16b3$1@newsgroups.borland.com> <480d2d9c$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <480d4e0d$1@newsgroups.borland.com> Date: 21 Apr 2008 19:31:41 -0700 X-Trace: newsgroups.borland.com 1208831501 207.105.83.66 (21 Apr 2008 19:31:41 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!217.73.144.45.MISMATCH!feeder2.ecngs.de!ecngs!feeder.ecngs.de!news.isoc.lu!newsgroups.borland.com!not-for-mail