[fpc-devel] Threads and alot of crap continued

Michael Schnell mschnell at lumino.de
Wed Nov 8 11:55:21 CET 2006

> Also I think a base thread should remain free from this. You can of course
> create a descendant of tthread that is event driven (e.g. messagequeue, pump
> and list of known events/methodvars in overriden tthread.execute)
Right. That is a decent way to do it "optionally" (as I of course would 
do it, not to break any running code). So a TApplicationThread class 
might be defined in the RTL as a descendant of TThread. It might have a 
TApplicationThread property the type of which might be a descendant of 
TCustomApplication and provides the non preemptive scheduling stuff 
based in messages.

But before doing this I'd like to do/have a TApplication that might be a 
descendant of TCustomApplication for the main thread for the same 
purpose here. (similar as Lazarus, but not using any GUI stuff).

TTimer, TThread (.Synchronize ! ) etc. might be affected by this, too.


More information about the fpc-devel mailing list