[fpc-devel] C++ gets language-internal concurrency support
Marco van de Voort
marcov at stack.nl
Wed Aug 17 18:14:03 CEST 2011
In our previous episode, David W Noon said:
> The threads t1 and t2 execute in parallel. Moreover, they will execute
> in parallel with any code that occurs between the declaration that
> start the threads and the join() method calls that synchronize them
> with the invoking thread. On a SMP system they will execute physically
> in parallel, not simply timesliced against one another. The underlying
> implementation model is that of POSIX threads.
I know, but this is an explicit form of parallelism, and spawns one thread,
not much different from Delphi tthread. (specially as coupled with anonymous
methods in later versions)
The .NET/Prism "parallel for" however spawns multiple
threads, one for each "for" iteration, probably with some maximum.
Note that I'm not so sure that the "parallel for" is a good (read:
practical) thing to have, it is just that I noted some discrepancy in M.
Schnell's original post where he tied the new C++ features to the Prism
functionality.
More information about the fpc-devel
mailing list