8

Threading Basics –Asynchronous Programming

Most modern software runs its processes in parallel and offloads tasks to different threads to take advantage of modern CPU multicore architecture. This way, software can be more efficient by running multiple processes simultaneously without affecting performance. In this chapter, we will learn how to make use of threads to boost our Qt 6 application’s performance and efficiency.

This chapter will cover the following recipes:

  • Using threads
  • QObject and QThread
  • Data protection and sharing data between threads
  • Working with QRunnable processes

Technical requirements

The technical requirements for this chapter include Qt 6.6.1 and Qt Creator 12.0.2. All the code used in this chapter can be downloaded ...

Get Qt 6 C++ GUI Programming Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.