Article View: borland.public.cppbuilder.internet.socket
Article #4577Re: ThreadedEvent of TIdUDPServer
From: Remy Lebeau (TeamB)
Date: Thu, 13 Jan 2005 17:30
Date: Thu, 13 Jan 2005 17:30
27 lines
1849 bytes
1849 bytes
"Tumurbaatar S." <nospam_tumur@magicnet.mn> wrote in message news:41e64ebc@newsgroups.borland.com... > Is there any performance difference on setting this property > to true or false? Yes. When ThreadedEvent is false, the triggering of the OnUDPRead event is synchronized and executed in the context in the main VCL thread rather than the context of the worker thread inside of the TIdDUPServer. > My program is Win32 Service (TService) and most of work is > performed in a separate thread. The OnExecute contains only > standard lines of code which checks for a termination and does > ProcessRequests. Then I suggest you not use the service's OnExecute event at all. TService already does all of that automatically when you do not provide an OnExecute event hander. You don't need to do that manually. > OnUDPRead event handler is small as possible. Set ThreadedEvent to true, and make sure your OnUDPRead handler code is thread-safe. Gambit
Technical Details
Message-ID:
<41e6afc6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41e64ebc@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b8189fb3b53d91a X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <41e64ebc@newsgroups.borland.com> Subject: Re: ThreadedEvent of TIdUDPServer Date: Thu, 13 Jan 2005 09:30:33 -0800 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <41e6afc6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1105637318 68.69.17.41 (13 Jan 2005 09:28:38 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail