Feature request: processing of messages during TIdCustomTCPServer.TerminateAllThreads

Giganews Newsgroups
Subject: Feature request: processing of messages during TIdCustomTCPServer.TerminateAllThreads
Posted by:  M (Mitja.Perko.no_freakingspam@trinet.si)
Date: Thu, 22 Nov 2007

I had a problem when request on server was waiting for some message
before being able to complete it. If during that time (waiting for
message) within the request TcpServer.Active was set to false it
"freezed" up since TerminateAllThreads does no message processing during
waiting for all threads to end. In my case it stucked on
FScheduler.TerminateAllYarns.

So maybe something like TThread.WaitFor could be implemented instead of
IndySleep(500)?

I guess processing messages should have no bad influence on the rest of
Indy but I could be wrong.

The listed todo also sounds very nice. Thumbs up for this :)
// TODO:  reimplement support for TerminateWaitTimeout
This will be very good to prevent freezing.

Mitja

Replies