🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4859

Re: Indy - ReadFromStack - Success!

#4859
From: Remy Lebeau (TeamB)
Date: Wed, 01 Dec 2004 23:51
25 lines
2126 bytes
"Paul Machiaverna" <paul.machiaverna@i-stat.com> wrote in message
news:41ae533d$1@newsgroups.borland.com...

> I tried some code in a test application.  Each OnExecute contained a
> Synchronized call to a function that displayed a message in a text box.
> Each message appeared at a frequency of ~800 milliseconds.  Maybe
> this long delay was caused by the call to Synchronize?

Yes.  Synchronize() has to post a request to the main VCL thread and then
wait for the request to be processed.  That takes time.  If you display the
message box directly via the OnExecute event handler without using
Synchronize() (using TApplication::MessageBox() or the Win32 API
MessageBox(), *not* using ShowMessage() or MessageDlg() or any of those
functions - they display VCL forms and thus need synchronizing), you will
see a difference.

> There needs to be a maximum of 55 milliseconds between each call
> to OnExecute.

You will get that, as long as your own code inside the OnExecute event
handler is running that fast to begin with.


Gambit
Technical Details
Message-ID: <41ae58f6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41ae292f$1@newsgroups.borland.com> <41ae3c5e$3@newsgroups.borland.com> <41ae533d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a8641c691be161db
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: <41ae292f$1@newsgroups.borland.com> <41ae3c5e$3@newsgroups.borland.com> <41ae533d$1@newsgroups.borland.com>
Subject: Re: Indy - ReadFromStack - Success!
Date: Wed, 1 Dec 2004 15:51:15 -0800
Lines: 27
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: <41ae58f6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1101945078 68.69.17.41 (1 Dec 2004 15:51:18 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail