Managing threads in concurrent C++ applications often introduces complexity, particularly when long-running tasks need to be gracefully shut down without causing resource leaks or race conditions. This course focuses on the modern, standardized approach introduced in C++20 to solve this critical problem.
By the end of this course, you will be able to design and implement robust concurrent programs where threads can be safely requested to stop, allowing for clean resource cleanup and predictable termination behavior.
What you'll learn:
* Understand the fundamental concepts of cooperative thread interruption versus forced termination and why cooperation is essential.
* Apply std::jthread as the modern, interruptible alternative to traditional thread management.
* Configure and use std::stop_source and std::stop_token to signal and check for interruption requests within a running thread.
* Practice registering cleanup actions using std::stop_callback for safe resource management during shutdown.
* Implement robust concurrent patterns ensuring RAII principles are maintained even when interruption occurs.
The course begins with foundational concepts of C++ concurrency and the inherent problems of traditional thread termination. It then systematically introduces the C++20 API components, providing detailed explanations and practical code examples demonstrating their correct usage.
This course is designed for beginner C++ developers who have basic programming knowledge but are new to modern concurrency features. No prior experience with the older std::thread API is required.
Start learning how to build faster, safer concurrent C++ applications today.
เนื้อหาคอร์ส
สิ่งที่คุณจะได้รับ
📜ใบประกาศนียบัตร เพิ่มในโปรไฟล์ LinkedIn ของคุณ
💬ติวเตอร์ AI ส่วนตัว ติดขัดในบทเรียน? ถามติวเตอร์ในตัวของคุณได้ทุกอย่าง ทุกเวลา