Re: To thread or not to thread



"Tom de Neef" <tdeneef@xxxxxxxx> wrote in message
news:449d4b79$0$31644$e4fe514c@xxxxxxxxxxxxxxxxx
[...]
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 ?

Definitely. If it's in a different thread, it will of necessity not
affect your VCL thread. And if your VCL thread wants to come out of
idle because a message just came in but it can't because it's still
waiting for that Get() to finish, you weren't idle enough.

And a Get() call can take a long time. It sends a request to the
HTTP server, over the network, and _waits for the response_. It
can download an ISO image over a 56Kb connection. You do the math.

Groetjes,
Maarten Wiltink


.