Why and How we fixed std::thread by std::jthread - Nicolai Josuttis [ C++ on Sea 2020 ]

With C++20 we will have a new basic thread class, std::jthread. It will fix some basic flaws of std::thread, because std::thread was not designed as an easy-to-use RAII type and lacks support for stopping a running thread. Sounds easy: we only have to pass a parameter to signal cancellation and implement a destructor that performs this request before it joins. But regarding concurrency, nothing is easy in programming. The devil is in the details, especially in C++. So this is not a talk about jthread. It is a talk about how implementing a pretty simple additional concurrent requirement became a tricky task with many traps. You don't want to do it yourself. ------- Nicolai Josuttis (www.josuttis.com) is well known in the C++ Community for speaking and writing with authority about C++ (being the author of "The C++ Standard Library", "C++ Templates" (coauthor), and "C+++17 - The Complete Guide") but is also an innovative presenter. He is an active member of C++ standardization committee for more than 20 years now. ------- C++ on Sea is an annual c++ and coding conference, usually held in Folkestone, Kent in the UK. The 2020 conference was moved to a virtual event due to social distancing requirements. Produced and Edited by Digital Medium Ltd: https://events.digital-medium.co.uk Enquiries: [email protected]

Live Compiler Development with Cross-Platform Tooling - Sy Brand [ C++ on Sea 2020 ]
▶︎

Live Compiler Development with Cross-Platform Tooling - Sy Brand [ C++ on Sea 2020 ]

Back to Basics: Concepts in C++ - Nicolai Josuttis - CppCon 2024
▶︎

Back to Basics: Concepts in C++ - Nicolai Josuttis - CppCon 2024

Correct by Construction: APIs That Are Easy to Use and Hard to Misuse - Matt Godbolt [ C++ on Sea ]
▶︎

Correct by Construction: APIs That Are Easy to Use and Hard to Misuse - Matt Godbolt [ C++ on Sea ]

C++ Smart Pointers - Usage and Secrets - Nicolai Josuttis
▶︎

C++ Smart Pointers - Usage and Secrets - Nicolai Josuttis

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains
▶︎

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains

KEYNOTE: What Everyone Should Know About How Amazing Compilers Are - Matt Godbolt [C++ on Sea 2019]
▶︎

KEYNOTE: What Everyone Should Know About How Amazing Compilers Are - Matt Godbolt [C++ on Sea 2019]

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones
▶︎

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Data-Oriented Design for Object-Oriented Programmers - Shachar Langbeheim [ C++ on Sea 2020 ]
▶︎

Data-Oriented Design for Object-Oriented Programmers - Shachar Langbeheim [ C++ on Sea 2020 ]

Back to Basics: Templates in C++ - Nicolai Josuttis - CppCon 2022
▶︎

Back to Basics: Templates in C++ - Nicolai Josuttis - CppCon 2022

An Introduction to Multithreading in C++20 - Anthony Williams - CppCon 2022
▶︎

An Introduction to Multithreading in C++20 - Anthony Williams - CppCon 2022

Modern C++: Unique Ptrs and Vectors
▶︎

Modern C++: Unique Ptrs and Vectors

CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced.  What do they really do?”
▶︎

CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup
▶︎

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

C++17 : The Biggest Traps - Nicolai Josuttis [C++ on Sea 2019]
▶︎

C++17 : The Biggest Traps - Nicolai Josuttis [C++ on Sea 2019]

Back to Basics: Concurrency - Arthur O'Dwyer - CppCon 2020
▶︎

Back to Basics: Concurrency - Arthur O'Dwyer - CppCon 2020

Back to Basics: Move Semantics - Nicolai Josuttis - CppCon 2021
▶︎

Back to Basics: Move Semantics - Nicolai Josuttis - CppCon 2021

C++ STL best and worst performance features and how to learn from them - Danila Kutenin [ C++onSea ]
▶︎

C++ STL best and worst performance features and how to learn from them - Danila Kutenin [ C++onSea ]

Pacific++ 2018: Sean Parent "Generic Programming"
▶︎

Pacific++ 2018: Sean Parent "Generic Programming"

Unlocking Modern CPU Power - Next-Gen C++ Optimization Techniques - Fedor G Pikus - C++Now 2024
▶︎

Unlocking Modern CPU Power - Next-Gen C++ Optimization Techniques - Fedor G Pikus - C++Now 2024

Networking in C++ Part #1: MMO Client/Server, ASIO & Framework Basics
▶︎

Networking in C++ Part #1: MMO Client/Server, ASIO & Framework Basics