Re: Stop Http Server

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

"Christian Kaufmann" <christian.kaufma…@gmx.net> wrote in message
news:nd0j771jqj1m46jalh356gmv8r2trm5n…@4ax.com...

> 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)

Replies

In response to

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