Skip to content

ourarash/multithreading_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi Threading Tutorial in C++

Quick demonstration of multi threading in modern C++

Features:

  • Creating task and threads
  • Using function pointers, functors, and lambda functions
  • Futures, promises, and async tasks
  • Mutex and Locks
  • Conditional Variables
  • Supports Google Bazel

Here is the video explaining how to use multi-threading in C++:

Debugging C++ in Visual Studio Code using gcc/gdb and Bazel

Installation

git clone https://github.com/ourarash/multithreading_cpp.git

Running examples:

You can run this either using bazel OR just plain g++.

For bazel:

bazel run src/main:main

For g++:

g++ -std=c++17 -lpthread src/main/main.cc  -I ./
./a.out

Bazel Installation and Visual Studio Setup

For instructions on installing Bazel and setting it up in Visual Studio Code see here

About

Tutorial on Multithreading in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published