jthread

An Improved Thread with C++20

std::jthread stands for joining thread. In addition to std::thread (C++11), std::jthread automatically joins in its destructor and can cooperatively be interrupted. Read this post to know why std::jthread should be your first choice.

Read more
Tags: jthread
Views: 73937

Cooperative Interruption of a Thread in C++20

A typical question in my C++ seminars is: Can a  thread be killed? Before C++20, my answer is no. With C++20, you can ask a thread politely for its interruption.

Read more
Tags: jthread
Views: 20934

A new Thread with C++20: std::jthread

One of the participants in my CppCon 2018 workshop asked me: "Can a std::thread be interrupted?". No, that was my answer, but this is not correct anymore. With C++20, we might get a std::jthread.

Read more
Tags: jthread
Views: 251920

Stay Informed about my Mentoring

 

Mentoring

English Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Course: The All-in-One Guide to C++20

Course: Master Software Design Patterns and Architecture in C++

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 4639

Yesterday 6193

Week 10832

Month 32506

All 12110715

Currently are 180 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments