Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-08

C++ gets language-internal concurrency support

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Schnell
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.lazarus.freepascal.org/pipermail/lazarus/attachments/20110822/29b0a460/attachment.html>

Reply by email

leledumbo
to Michael Schnell
I seem to remember that there is an article about same in the FPC Wiki.

Yep, here: http://wiki.lazarus.freepascal.org/OpenMP_support but it looks like no one is working on it...

More can be found here:
http://wiki.lazarus.freepascal.org/Category:Parallel_programming

Reply by email