Board index » delphi » Asynchronous option with Indy?

Asynchronous option with Indy?


2004-03-03 01:23:30 PM
delphi114
When I submit a request, such as an HTTP post, it locks up the application
until the request has been processed. Is there a way to set it so that Indy
runs in asynchronous mode so as not to lock up my application?
 
 

Re:Asynchronous option with Indy?

"Dan Bassett" <XXXX@XXXXX.COM>writes
Quote
When I submit a request, such as an HTTP post,
it locks up the application until the request has been
processed.
All Indy operations do that. That is part of Indy's overall design.
Quote
Is there a way to set it so that Indy runs in asynchronous
mode so as not to lock up my application?
No. You will just have to perform the operation in a separate thread of its
own. Otherwise, your only other option, assuming you are using the TIdHTTP
(or any other component) within the main VCL thread is to place a
TIdAntiFreeze onto the MainForm. The first option is generally preferred,
though, not to mention is a cleaner and safer solution and more efficient
overall.
Gambit
 

Re:Asynchronous option with Indy?

Remy Lebeau (TeamB) writes:
Quote
All Indy operations do that. That is part of Indy's overall design.
And not just Indy. AFAIK every "asynchronous" library employs some kind of
threads internally. So you might as well do it yourself.
--
Ben
 

Re:Asynchronous option with Indy?

"Ben Hochstrasser" <bhoc@tiscali123^H^H^H.ch>schreef in bericht
Quote
And not just Indy. AFAIK every "asynchronous" library employs some kind of
threads internally.
Not true. I have been using the ICS library for a couple of years now, and I
can assure you that it does not and does not need to use threads internally.
It works great without them!
Once there was a time (Win16) when there were sockets but no
multi-threading. And guess what, life wasn't too bad even back then!
Eric Jansen (getting too old for this job? ;-)
 

Re:Asynchronous option with Indy?

"Eric Jansen" <XXXX@XXXXX.COM>wrote in
Quote
Not true. I have been using the ICS library for a couple of years now,
and I can assure you that it does not and does not need to use threads
internally. It works great without them!
If you dont use thread, you suffer frome queuing though. ;)
Quote
Once there was a time (Win16) when there were sockets but no
multi-threading. And guess what, life wasn't too bad even back then!
You didnt program much back in Win16 days did you? Or maybe you did but have
repressed the memories?
I have very very unfond memories of such days...
Need extra help with an Indy problem?
www.atozed.com/indy/experts/
 

Re:Asynchronous option with Indy?

"Chad Z. Hower aka Kudzu" <XXXX@XXXXX.COM>writes
Quote
I have very very unfond memories of such days...
Indeed. Can you say "segmented memory"? Argh!!! And any unstable app would
pull down the whole OS. Ugh.
 

Re:Asynchronous option with Indy?

Quote

Indeed. Can you say "segmented memory"? Argh!!! And any unstable app would
pull down the whole OS. Ugh.

Yeah! Then, at last, we got W95 and.....
Then, at last, we got W98 and.....
Then, at last, we got NT, 2K & XP.
Rgds,
Martin