Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On High Performance Programming with Qt 5

You're reading from   Hands-On High Performance Programming with Qt 5 Build cross-platform applications using concurrency, parallel programming, and memory management

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher Packt
ISBN-13 9781789531244
Length 384 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Marek Krajewski Marek Krajewski
Author Profile Icon Marek Krajewski
Marek Krajewski
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Understanding Performant Programs 2. Profiling to Find Bottlenecks FREE CHAPTER 3. Deep Dive into C++ and Performance 4. Using Data Structures and Algorithms Efficiently 5. An In-Depth Guide to Concurrency and Multithreading 6. Performance Failures and How to Overcome Them 7. Understanding I/O Performance and Overcoming Related Problems 8. Optimizing Graphical Performance 9. Optimizing Network Performance 10. Qt Performance on Embedded and Mobile Platforms 11. Testing and Deploying Qt Applications 12. Assessments 13. Other Books You May Enjoy

Chapter 5

  1. Why is a data race an undefined behavior (UB) in C++?
    Because changes from one thread may not yet be visible in another thread, and thus some results would be not defined! Thread visibility is a concept we haven't discussed yet, but the main concept is that different threads are allowed to work on their local cache data and only push the changes to the other thread caches when they are forced to do so. We can force such an update using a memory fence, and memory fencing is part of the implementation of mutexes and atomic variables. See also the response to question 10.
  2. What is resource acquisition is initialization (RAII) (we have seen it already in Chapter 3, Deep Dive into C++ and Performance), and how is it used in QAtomicLocker?
    It describes an object that initializes some resource in its constructor and deinitializes it in the destructor. The QAtomicLocker...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime