Re: idHTTP blocks timer when connection is iterrupted?

Giganews Newsgroups
Subject: Re: idHTTP blocks timer when connection is iterrupted?
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Fri, 8 Sep 2006

"CBruner" <cbruner@____quadro.net> wrote in message
news:CC1C1B681B07E340cbruner@____quadro.net...

> I also have a timer which once a second updates status and gives
> the average time of the download over the last 10 seconds.

Indy is a blocking library.  You can't run a timer in the same thread at the
same time that a download is being performed.

> My problem is that when the download gets interrupted the
> timer event doesn't fire anymore.

Please elaborate.  What kind of timer are you trying to use exactly?
Interrupting TIdHTTP should not have any effect on timers.

> This is rather important to me because other things need to happen if
> the average time goes down below a certain point.

I suggest you move the download to a separate thread that posts
notifications to your timer thread about its progress.

> Does anyone know why the timer stops working when the
> idHTTP is interrupted?

Not until you provide more details about what exactly you are doing in the
first place.

Gambit

Replies

None

In response to

idHTTP blocks timer when connection is iterrupted? posted by CBruner on Fri, 08 Sep 2006