Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : 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: | Tue, 18 Sep 2007 21:19:20 |
Hej,
Are you saying that if my application creates a worker thread then the main
thread will not be blocked?
I appear to be experiencing this.... i.e. my worker thread blocks my main
thread.
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.
/richard
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:46f0113f$1@newsgroups.borland.com...
>
> "Richard Bibby" <richard.bibby@profdoc.com> wrote in message
> news:46efd3d1@newsgroups.borland.com...
>
>> This worked well with UDP but not with TCP. The application
>> hangs even though the cleint TCP compoent is running in its
>> own thread.
>
> The only way that can happen is if you are connecting to the server in the
> context of the main thread instead of the worker thread, such as via a
> synchronized call.
>
>
> Gambit