Threads

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

We'll cover the following

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 1000+ tech skills courses.

Learn to code, grow your skills, and succeed in your tech interview