Multithreaded Programming with C++

A professional C++ programmer needs to know how to write correct multithreaded code to take full advantage of all the available processor units. Writing multithreaded applications used to rely on platform‐ and operating system‐specific APIs. This made it difficult to write platform‐independent multi...

Celý popis

Uložené v:
Podrobná bibliografia
Vydané v:Professional C++ s. 1 - 2
Hlavný autor: Gregoire, Marc
Médium: Kapitola
Jazyk:English
Vydavateľské údaje: Hoboken, New Jersey John Wiley & Sons 2018
John Wiley & Sons, Inc
Vydanie:4th Edition
Predmet:
ISBN:1119421306, 9781119421306
On-line prístup:Získať plný text
Tagy: Pridať tag
Žiadne tagy, Buďte prvý, kto otaguje tento záznam!
Popis
Shrnutí:A professional C++ programmer needs to know how to write correct multithreaded code to take full advantage of all the available processor units. Writing multithreaded applications used to rely on platform‐ and operating system‐specific APIs. This made it difficult to write platform‐independent multithreaded code. C++11 solved this problem by including a standard threading library. A difficult part of multithreaded programming is making the algorithm parallel, which is highly dependent on the type of the algorithm. Other difficulties are preventing race conditions, deadlocks, tearing, and false‐sharing. This chapter discusses these difficulties in more detail. They are usually solved using atomics or explicit synchronization mechanisms. Launching a new thread is pretty easy. However, in most cases the programmers are probably interested in results produced by the thread. There is one easier method to obtain a result from threads: futures.
ISBN:1119421306
9781119421306
DOI:10.1002/9781119421276.ch23