[fpc-devel] Suggestion: reference counted objects
mschnell at lumino.de
Thu Sep 25 11:14:36 CEST 2014
On 09/22/2014 08:51 PM, Boian Mitov wrote:
> I am not big fan of the compiler handling parallel loops, as it will
> limit any flexibility in implementation.
> A library based functionality with shared executors is a better
> design, and it allows not only for parallel loops but also for easy
> parallel recursions and many other combined(iterative/recursive)
I just did that (a TThreadPool class, see the other thread). Not because
I wanted to use it, but to do some research on the issue.
While I do think that the thingy does work well and is decently
designed, and it might be nice to provide it as a package, I think it's
not "nice" to use, as you need to do and instantiate appropriate objects
with "Execute" functions to make use of it.
Some compiler magic could do this on the fly for lazy programmers
Of course I do know about the possible risk if they unintentionally
might access the same thingy without caring for mutexes. But I am not
sure that not providing a parallel loop syntax would help much.
More information about the fpc-devel