C++ Thread Tutorial - Command Queue | C++ in 2021
2 years ago
13
In this lesson, I introduce the C++ standard thread library by showing you how you can build a concurrent queue system.
We'll build upon this queue system in future lessons to achieve a multiple thread queue with thread pools and data sharing.
C++ in 2021 Github:
https://github.com/mauville-technologies/cppin2021/releases/tag/tutorial-05
Reference Material:
C++ Concurrency in Action: https://amzn.to/3iuSGLd
Chapters:
0:00 Intro
1:10 Github Repo
1:50 TaskManager Module Interface
4:50 Main Command Loop
11:35 std::thread basics
18:05 Implementing the Command Queue
31:00 Closing a thread / RAII
34:10 Joining threads ( Learning as we go )
39:50 Demonstrating the Queue concurrency
42:00 Detaching Threads + Daemon Threads ( + live experimentation)
Loading comments...
-
LIVE
The Quartering
2 hours agoBiden Has Desperate Orange Meltdown, Trump Gains In Polls & Woke Disney Gets Desperate
3,459 watching -
16:13
Scammer Payback
6 days agoLet's Show a 𝗦𝗖𝗔𝗠𝗠𝗘𝗥 His Pictures
1.42K10 -
56:44
Ben Shapiro
3 hours agoEp. 1996 - Wait, Can Donald Trump DRONE His Political Enemies Now?!
26.8K26 -
1:09:31
Russell Brand
4 hours agoTHEY’RE POISONING US | Big Pharma’s Shocking TRUTH - Stay Free 398
100K157 -
LIVE
TheAlecLaceShow
2 hours agoOrange Biden Slams SCOTUS Ruling | Debate Night Fallout | Who Replaces Biden? | The Alec Lace Show
944 watching -
LIVE
The Charlie Kirk Show
2 hours agoDems in Disarray + The Immunity Question + Why Biden Can't Leave | Paoletta, Starbuck, Bedford, Webb
12,399 watching -
LIVE
Omar Elattar
1 day agoANDREW TATE: $100 Million Confessions, Trump Vs. Biden, Elon Musk & Palestine-Israel
541 watching -
1:21:18
The Rubin Report
3 hours agoBill Maher’s Audience Stunned by His Brutal Honesty on Biden
62.8K131 -
1:00:10
The Dan Bongino Show
5 hours agoSPECIAL: Best Of The Dan Bongino Show - 07/02/24
169K766 -
1:21:55
Benny Johnson
3 hours agoMELTDOWN: Orange Biden!? Entire DNC BACKSTABS Joe, ALL Trump Charges DISMISSED After SCOTUS Victory?
73.1K189