[fpc-devel] Parallel Computing

Michael Schnell mschnell at lumino.de
Mon Dec 10 16:24:28 CET 2007


> Think about the alternative: It is much harder to implement the same
> parallel loop with TThread. So OpenMP makes parallel loops much easier
> to implement. For me this is the 'Delphi' way: Makes things easy and
> readable.
>   
Of course you are right. In the example of "parallel" loops It's _a_lot_ 
easier to to use for the programmer. "Lightweight-threaded" stuff like 
parallel loops was not the original aim of ThreadEvents. The original 
target was a more "standard" use of threads. But it _can_ be used for 
parallel loops, too, and it follows the "Delphi-language-paradigms" a 
lot tighter than using TThread.

I don't suppose that anybody will start implementing real parallel loops 
like suggested on the wiki page any time soon. But TEventThread and 
"Thread Events" is quite easy to do.
> The 'of thread' is a language change, not just an RTL enhancement.
>   
Sorry if I have been vague here. Of course it is (as is the alternative 
to enhancing the meaning of "of object"). But this is only another 
enhancement that can be done as a second step. Most of the functionality 
can be used (or at least tested) by just implementing TEventThread (and 
TMainEventThread) in the RTL (and maybe LCL).
> That's why you must add links pointing to the page.
>   
Of course. But where  to add them ?
> About search optimization: The page is called OpenMP and this is what
> users see. They don't see Eventhreads.
>   
Of course you are right again: It's a good idea to do a separate page. 
I'll do that ASAP,

-Michael



More information about the fpc-devel mailing list