Re: Stop Http Server

Giganews Newsgroups
Subject: Re: Stop Http Server
Posted by:  Remy Lebeau \(Indy Team\) (re…
Date: Wed, 21 Sep 2011

"Christian Kaufmann" <christian.kaufma…> wrote in message

> What happens if I do:
> FMyHttpServer.Active := False;

Connected clients are disconnected and running threads are terminated.

> If there are thread's with running request will the main thread
> wait until all this request thread's are done, shut down and freed?

The Active property setter does not exit until everything has been shut
down, so the calling thread will be blocked until then.  If that is your
main thread, then yes, the main thread will wait.  Make sure you do not
perform any synchronized requests during that time, because the main thread
will not be able to process them.

Remy Lebeau (TeamB)


In response to

Stop Http Server posted by Christian Kaufmann on Wed, 21 Sep 2011