std::async in cpp with background thread loading data example | Introduction to Concurrency in C++

Опубликовано: 21 Ноябрь 2021
на канале: Mike Shah
11,097
374

►Full Series Playlist:    • Modern C++ (cpp) Concurrency  
►Find full courses on: https://courses.mshah.io/
►Join as Member to Support the channel:    / @mikeshah  

►Git Repo: https://github.com/MikeShah/moderncpp...
►Lesson Description: In this lesson I show you an example with std::async and how you can use it to load data in a background thread. We also discuss the policies that exist for how to launch a std::async, and look at the futures library to get the status of our future.

00:00 Return to async
00:20 Real world example with Youtube
1:45 Program design with background thread
2:50 Starting our program
3:37 Discussion of std::async policies
4:50 Setting up our background thread
5:50 Understanding future_status
6:30 The main program loop
8:45 Checking status of future
10:02 Implementing our background thread
12:00 Compilation and bug fixes
12:40 Successful execution of the program
14:50 Conclusion, like, and subscribe!

►YouTube Channel:    / mikeshah  
►Please like and subscribe to help the channel!


Смотрите видео std::async in cpp with background thread loading data example | Introduction to Concurrency in C++ онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Mike Shah 21 Ноябрь 2021. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 11,097 раз и оно понравилось 374 посетителям.