Articles tagged (
threading
)




Multithreading using C++
Published 14 Jul 2021

Multithreading is useful for parallel execution of some tasks leads to a more efficient use of resources of the system. Built in support for multithreading was introduced in C++11

1f39776630d0d831472ba2d63a1921de.png9bd9b1d2e3393f3f82dc7ded6f920bb4.png

Multithreading support was introduced in C+11. Prior to C++11, we had to use POSIX threads or p threads library in C. While this library did the job the lack of any standard language provided feature-set caused serious portability issues. C++ 11 did away with all that and gave us std::thread. The thread classes and related functions are defined in the thread header file.

std::thread is the thread class that represents a single thread in C++. To start a thread we simply need to create a new thr...

155 views