[fpc-devel] Suggestion: reference counted objects

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Fri Sep 26 17:31:39 CEST 2014


Michael Schnell wrote:
> On 09/25/2014 07:27 PM, Boian Mitov wrote:
>> What I am saying is that the parallel loop handles only one specific 
>> case of parallelization, and with limited options.
>> A library implementation on the other hand offers full flexibility.
> Of course I did understand that.
> What I was saying that providing a "parallel loop" syntax candy to make 
> the library functions more easily usable in standard cases is (nothing 
> but) an additional benefit, but very helpful for many users..

A parallel loop syntax is very attractive, but the practical difficulty 
is that it would probably have to sit on top of threads and getting code 
distributed promptly over multiple worker threads, i.e. starting up 
within 10s of nSec rather than 10s of mSec, is non-trivial.

I still think that a prerequisite is something that can enforce 
sequential operation, so that a paralleled block could not be reentered:

procedure Sub (var x : array of Float); sequential;

  procedure ParallelBlock; parallel;

  begin

  end {ParallelBlock};

begin
  ParallelBlock;
end {Sub};

I suppose an interesting challenge, bearing in mind your earlier 
question about signals, is whether procedure or block modifiers can be 
declared as part of the language but implemented as replaceable runtimes.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-devel mailing list