This is not an async timer in the way Vincent meant it, assuming I read his mails correctly. Also, pre-emptive multitasking is different from the async timer as you're explaining here in exactly this detail.
An asynchronous timer needs to do a preemptive callback. Preemptive execution needs it's own thread. This is a way to provide the timer with a thread. The advantage of this way (explicitly use a TThread instead of having the timer create it's own thread) is (1) compatibility the timer works like commonly known only extending the paradigm to using the timer in a thread and (2) when using the associated thread for this objects can manipulated without caring about mutual access with the timer callback. If you simply want an asynchronous timer, just don't do anything else in the associated TThread. Of course you can do a TAsnycTimer class by using this scheme.

-Michael
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to