[fpc-devel] Threads and alot of crap continued

Michael Schnell mschnell at lumino.de
Wed Nov 8 11:41:39 CET 2006

> But now ... rereading the post, the original text was "You can't just 
> put a TTimer in which works in it's own thread and then calls some 
> callback in it's own thread," and I still wonder why I shouldn't be 
> able to do that (well, if TTimer would actually do what its name 
> suggests and no-one else would change the subject to one particular 
> Delphi-way-implementation called TTimer, when I am still talking about 
> a timer object in general).
Of course it would be great if a TTimer would fire it's events in a 
thread context that can be selected by the user (e.g. the thread context 
the TTimer.Create was called in, thus in a compatible way, the TTimers 
that are placed visually and therefor created by the application start 
code do main thread events). But (unfortunately :-) ) this is done 
neither in Delphi nor in Lazarus, and it's not easy to do, as I suppose 
it would need something like TThread.Application and with that a 
completely event-driven programming paradigm for the thread in question. 
This is exactly what I would like to see someday for FPC.


More information about the fpc-devel mailing list