Hi Arno and Francois,

I understood my my mistake. I think that TBaseThread.Create is thread context 
and it is wrong.
I found another decision. Nnow I create HtthCli before creating TBaseThread and 
put reference of it in TBaseThread.create. When TBaseThread terminate I free 
instanse of HtthCli in OnTerminate Event handler/
I 'll look for multithread sample programs for better understanding a 
technology.

What about TBaseThread.Destroy in wich context it execute? In context of thread?

With best regards,
Anatoly Podgoretsky

----- Original Message ----- 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Friday, October 06, 2006 10:11 AM
Subject: Re: [twsocket] How to use THttpCli with threads?


>> What I'm doing wrong?
> 
> Your HTTP component runs in the main thread since you created in the context
> of the main thread (TThread constructor execute in the context of the
> calling thread, not in the context of the created thread). Create you HTTP
> component instance from the thread's Execute method and free it at the end
> of the Execute method. Don't forget to have a message pump within your
> Execute method also. Look at the multithread sample programs delivered with
> ICS. See their creation date. Generally to more recent the better they are.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to