Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : Re: Block TCP client call in a thread?

www.cryer.info
Managed Newsgroup Archive

Re: Block TCP client call in a thread?

Subject:Re: Block TCP client call in a thread?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Tue, 18 Sep 2007 12:55:31

"Richard Bibby" <richard.bibby@profdoc.com> wrote in message
news:46f024e6$1@newsgroups.borland.com...

> Are you saying that if my application creates a worker
> thread then the main thread will not be blocked?

Correct.  As long as the thread's code is actually running in the thread's
own context.

> I appear to be experiencing this.... i.e. my worker thread
> blocks my main thread.

Then your thread code is delegating its work back to the main thread when it
shouldn't be.  Are you calling TThread.Synchronize(), by chance?

> To set what is happening I have dropped a TTimer on my form
> that will trigger every 200ms and update a label with the current
> time.  When I make the call to my worker thread I see the timer
> stop, then after a few seconds the app can be dragged arround
> the desktop, but the time does not get updated.  20 seconds later
> I have control again.

Please show your actual code.  Your thread code is obviously doing something
wrong.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive