[fpc-devel] C++ gets language-internal concurrency support

Michael Schnell mschnell at lumino.de
Mon Aug 22 10:21:33 CEST 2011


On 08/19/2011 01:53 PM, David W Noon wrote:
>
> The 2011 C++ standard does not, but GCC and a few other compilers offer
> a facility called OpenMP that parallelises loops; it works for C, C++
> and FORTRAN, at least within GCC.
I do know about OpenMP and I seem to remember that there is an article 
about same in the FPC Wiki.

A C++ extension might use some syntax-candy (like "parallel") to make 
OpenMP (hidden in a library) easily usable.

std::async(), std::future and std::promise seems to be provide some 
"sntax candy" for making threads more usable.

here in the FAQ they write:
"The *packaged_task* type is provided to simplify launching a thread to 
execute a task. In particular, it takes care of setting up a *future* 
connected to a *promise* and to provides the wrapper code to put the 
return value or exception from the task into the *promise*."

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110822/29e53f67/attachment.html>


More information about the fpc-devel mailing list