[fpc-devel] Threads and alot of crap continued

Vinzent Hoefler JeLlyFish.software at gmx.net
Wed Nov 8 08:14:34 CET 2006


On Tuesday 07 November 2006 17:10, Michael Schnell wrote:
> > Of course, because the common concept of a timer is as asynchronous
> > as in "multi-threaded" or even "interrupt".
>
> That is not true ! (See my other post.)

Well, a timer is, even though the Delphi implementation of a so-called 
TTimer object might not.

Basically a timer starts, later then it expires an that expiration 
creates an event (in the old days we called that interrupt). This event 
is no way synchronous to the code currently running.

> Timer events are queued in a line (message-queue) with all
> "hardware"/"GUI" events.

Ok. So this would do nothing more than synchronize the asynchronous 
event of an expired timer to the main thread. Of course, the "time" of 
execution of the code associated with the expiration is now determined 
by the time the message queue is handled the next time.

So why don't use CheckSynchronized for this?


Vinzent.




More information about the fpc-devel mailing list