Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes C / C++ and the fly likes concurrency in C++? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "concurrency in C++?" Watch "concurrency in C++?" New topic
Author

concurrency in C++?

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
Hello author,
In current c++ standrd[1998], how multithreading is handled? Is it compiler specific like based on p-threads/WinAPI?
Is C++0x defining new standard for concurency?

Regards


MH
Anthony Aj Williams
author
Ranch Hand

Joined: Jun 10, 2011
Posts: 56
Arjun Shastry wrote:
In current c++ standrd[1998], how multithreading is handled? Is it compiler specific like based on p-threads/WinAPI?


In C++98, the standard does not acknowledge the existence of multithreading. Any use of multithreading is thus compiler/platform specific. As you suggest, POSIX threads and the Windows API are commonly used for multithreading in C++.

Arjun Shastry wrote:
Is C++0x defining new standard for concurency?


Yes. C++0x defines a memory model which acknowledges the existence of multiple threads, and provides a set of concurrency facilities in the library. My book covers both of these in depth.


Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/
just::thread C++11 thread library http://www.stdthread.co.uk
Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: concurrency in C++?
 
Similar Threads
Job Band in infosys
Release Announcement - "C++ in a Nutshell" - O'Reilly
I.O read and write same time?????
Q on static inner Classes
tricky question