Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Nov : Indy IdTcpServer thread annoyance?
| Subject: | Indy IdTcpServer thread annoyance? |
| Posted by: | "rejj" (rejj-..@thartex.net) |
| Date: | Fri, 17 Nov 2006 15:44:43 |
I'm currently in the middle of a project which uses IDTCPServer in Delphi 5.
Problem is there seems to be a zombie-thread that never gets ended
properly, it's not visible inside Delphi(Thread status window), but it
is in Taskmanager and SysInternals ProcessExplorer.
Steps to reproduce:
Drop IDTCPServer on form.
Set Defaultport
(if using dev snapshot, make OnExecute handler and Assign it to
IDTCPServer1)
Add Button1, Button2: on Button1 IDTCPServer1.Active := TRUE; on Button2
IDTCPServer1.Active := FALSE;
Open TaskManager, start your project.
While Not [DONE] Do Begin
Press Button1
Press Button2
Watch as Application appears to have more threads than intended. Inc
by 2 on Button1, Dec by 1 on Button2.
Also watch as Application gobs up about 4k mem and 24k vm according
to taskmanager, not an exact science I know.
end;
It isn't really a problem since the server shouldn't activate and
deactivate very often, but I still find it annoying.
Is there something I'm missing totally in this perhaps ?.
Regards
rejj.