Threads

This lesson will discuss the basic building block of multithreaded programs - threads.

Introduction

C++ has used a multithreading interface since C++11. This interface contains all the basic building blocks for creating multithreaded programs. These are called threads, which are synchronization primitives for shared data such as mutexes and locks, thread-local data, synchronization mechanism for threads such as condition variables, and tasks. These tasks are usually called promises and futures, and they provide a higher level of abstraction than native threads.

Get hands-on with 1200+ tech skills courses.