Bogusław Brandys wrote:
Working without problems with lazarus 0.9.11 revision 8188 and FPC 2.0.3
from 2005-11-17
Great to hear that! I was already recreating the thread code with Win
API and almost recreating the GUI on Delphi 7 ...
By the way : Why you are using suspend inside thread ?
The program is an osciloscope and it needs to capture 300 measures from
the hardware, show them on screen and then repeat the process about 0,5
second latter. The measurement is on the secondary thread.
So, I need to remeasure every 0,5 seconds and I could not find a way to
restart the thread. Creating, terminating and recreating a TThread
object every 0,5 seconds seamed to me like an awful overhead, and any
possible memory leaks in the process would quickly flood the system.
Then I decided to create a loop. The thread executes what it needs and
then suspends itself. The main program will Resume the thread when it
needs new measurements.
The thread code is something like this:
while (not Terminated) do
begin
// Here measure 300 times the voltage on the hardware
SuspendThread(vMedidor);
end;
Felipe
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives