Updated: October 28, 2024 |
There are two classes of problems where the application of threads is a good idea.
Threads are great where you can parallelize operations—a number of mathematical problems spring to mind (graphics, digital signal processing, etc.). Threads are also great where you want a program to perform several independent functions while sharing data, such as a web-server that's serving multiple clients simultaneously. We'll examine these two classes.