To thread or not to thread
- From: "Tom de Neef" <tdeneef@xxxxxxxx>
- Date: Sat, 24 Jun 2006 16:26:00 +0200
My app needs to check a number of things on the web. This can be done in the
background.
I use idHTTP to pull data in. This process is broken down into small parts
and the subroutinen are called in the OnIdle handler of the main form.
I notice that sometimes idHTTP needs a considerable time to build the
connection/fetch the data and the application doesn't repond to user actions
during such periods.
To cope with this I have now implemented the web data fetching in a thread
with priority tpIdle. I think the problem of non-response has gone, ut it is
difficult to test.
Am I right in assuming that the statement
document:=idHTTP1.Get(someURL);
in the thread should be less disruptive to the user than the same call in
the OnIdle handler ?
TIA
Tom
.
- Follow-Ups:
- Re: To thread or not to thread
- From: Bjørge
- Re: To thread or not to thread
- From: Maarten Wiltink
- Re: To thread or not to thread
- Prev by Date: Re: Binary
- Next by Date: Re: To thread or not to thread
- Previous by thread: What unit to find functions and procedures?
- Next by thread: Re: To thread or not to thread
- Index(es):