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ženo v:
Podrobná bibliografie
Vydáno v:Professional C++ s. 1 - 2
Hlavní autor: Gregoire, Marc
Médium: Kapitola
Jazyk:angličtina
Vydáno: Hoboken, New Jersey John Wiley & Sons 2018
John Wiley & Sons, Inc
Vydání:4th Edition
Témata:
ISBN:1119421306, 9781119421306
On-line přístup:Získat plný text
Tagy: Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
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