Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jan : Re: Can Synchronize()... ?

www.cryer.info
Managed Newsgroup Archive

Re: Can Synchronize()... ?

Subject:Re: Can Synchronize()... ?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Fri, 4 Jan 2008 14:33:39

"Jamie Dale" <jamie.dale@yahoo.com> wrote in message
news:477eaa88$1@newsgroups.borland.com...

> Can Synchronize be used to shut down TIdTCPServer from within a AThread?

If the TIdTCPServer belongs to the main thread, then no.  You will deadlock
your code.  If you need a server thread to shut down the server, then you
have to perform the shutdown asynchronously so the thread can terminate
itself properly when the shutdown actually occurs.  You can use the
TIdNotify class for that.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive