Article View: borland.public.cppbuilder.internet.socket
Article #1879Re: cancel download
From: anton
Date: Mon, 25 Sep 2006 18:19
Date: Mon, 25 Sep 2006 18:19
35 lines
2013 bytes
2013 bytes
Thanks again for your information. Just one stupid question: Do you have a simple example how to make a 'worker thread' ? Regards Anton "Remy Lebeau (TeamB)" <no.spam@no.spam.com> schreef in bericht news:45180c72$3@newsgroups.borland.com... > > "anton" <acvoosten@zeelandnet.nl> wrote in message > news:4517bf57@newsgroups.borland.com... > >> Using TidFtp, I sometimes have to download a lot of >> data. During this download I can't access any button > > The only way that can happen is if you are performing the download in the > context of the main thread. It is not a good idea to perform lengthy > blocking operations within the main thread. Move the download code into a > worker thread instead. Then the main thread remains free to manage the UI > only. > >> so for me it's impossible to cancel the download If I would so. > > It is not impossible. If you do not use a worker thread, then you will > have > to call Application->ProcessMessages() inside of the TIdFTP's OnWork > events > periodically. > > > Gambit > >
Technical Details
Message-ID:
<45181d9a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4517bf57@newsgroups.borland.com> <45180c72$3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,bf7bebd369250d51,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "anton" <acvoosten@zeelandnet.nl> Newsgroups: borland.public.cppbuilder.internet.socket References: <4517bf57@newsgroups.borland.com> <45180c72$3@newsgroups.borland.com> Subject: Re: cancel download Date: Mon, 25 Sep 2006 20:19:11 +0200 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 86.87.46.231 Message-ID: <45181d9a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1159208346 86.87.46.231 (25 Sep 2006 11:19:06 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail