Introduction to threads with C++11
Written by Lucas on
The free lunch is over. The time that our complex algorithm was running extremely slow on a computer, but ran extremely fast a few years later, because the processor speeds exploded, is gone. The trend with current processors is to add more cores, rather than increasing the clock frequency.
As programmer, you should be aware of this. Of course, processors will always perform better with each year, but less fast than before. Currently, a lot of programs can benefit the most by using multiple threads, because of today's multicore processors.
In this article I'll briefly explain what a thread is, and how you can create them with the new threading library in C++11. I'm planning to write multiple articles about this topic, each going a little bit more in depth.
