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:"Richard Bibby" (richard.bib..@profdoc.com)
Date:Thu, 20 Sep 2007 14:53:58

Hej,

You are right (but you knew that!).

I'll have to look at my component code to see why the thread is not running
seperately.

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:46f02d66@newsgroups.borland.com...
>
> "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:

none

In response to:

www.cryer.info
Managed Newsgroup Archive