Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jan : Re: TIdSMTP raises Thread creation error, help!!!
| Subject: | Re: TIdSMTP raises Thread creation error, help!!! |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 29 Jan 2007 00:14:43 |
"David" <focusme@yeah.net> wrote in message
news:45bc93ae@newsgroups.borland.com...
> the Connect produce will create thread?
Yes, it does. That is the only way to implement the ConnectTimeout
functionality for a blocking socket. The actual connection is opened
in a worker thread, while Connect() keeps track of the elapsed time.
If it takes too long, Connect() closes the socket. The thread is then
killed regardless of whether the connection succeeded or failed.
The only way to bypass the thread is to set ConnectTimeout to 0, and
not use a TIdAntiFreeze component. If ConnectTimeout is not 0, or
TIdAntiFreeze is used, then the thread is created.
Gambit