Am 2012-08-10 14:28, schrieb Michael Schnell:
On 08/10/2012 01:47 PM, Andrea Mauri wrote:
Must I use in some way the threads?
That is exactly what Michael vC said in his mail.
In a console application the main thread just starts, does some calculations and runs
right until returning and with that terminates the program. If you want to so a longer
living thingy, you need to hols the main thread e.g with sleep(). If during that time
some "Event" needs to be handled, only a thread can do this.
This is not necessariliy how it has to be. I have lots of programs that have a
simple endless loop with a delay() that checks for something in regular time
slots:
repeat
check something;
delay(100000);
until false;
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus