Despite the ever-increasing power of computer hardware, programs are still often called upon to perform tasks that take seconds, if not minutes, to complete. While such delays may be due to factors outside the programmer's control, it nevertheless reflects poorly on an application to become unresponsive while background tasks are running. In this chapter, we're going to learn about some tools that can help us to retain our application's responsiveness by deferring heavy operations or moving them out of the thread entirely. We'll also learn how to use a multithreaded application design to speed up these operations on multicore systems.
This chapter is broken into the following topics:
- Delayed actions with QTimer
- Multithreading with QThread
- High concurrency with QThreadPool and QRunner