Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Best way to shut down server app

www.cryer.info
Managed Newsgroup Archive

Re: Best way to shut down server app

Subject:Re: Best way to shut down server app
Posted by:"John Carlyle-Clarke" (jpcc@removethis.bigfoot.com)
Date:19 May 2006 15:37:23

"John Carlyle-Clarke" <jpcc@removethis.bigfoot.com> wrote in
news:Xns97C8C80C999D9discombobulation@207.105.83.66:

> "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote in
> news:446e068a$1@newsgroups.borland.com:
>
>>
>> "John Carlyle-Clarke" <jpcc@removethis.bigfoot.com> wrote in
>> message news:Xns97C899A172F89discombobulation@207.105.83.66...

>>> I seem to get some access violations sometimes on shutdown
>>> when closing the main form

>> Your code is likely not thread-safe.  TIdTCPServer is
>> multi-threaded, and the VCL (especially GUI components) cannot
>> safely be used outside of the main thread.
>>

>
> I've made it as thread safe as I know how, but I must have missed
> something.  I'm not used to debugging multithreaded code, so I'm
> finding it hard going spotting the problem.
>

I got to the bottom of it.  I was falling into the trap of assuming
that because it was multithreaded code and I am not experienced with
that, the problem must lie there.

Actually it was very simple, a standard mistake.

Thanks again.

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive