gcc/libstdc++-v3/include/std
Paul Scharnofske 0ebaea3b66 libstdc++: Assigning to a joinable std::jthread calls std::terminate
Move assigning to a std::jthread that represents a thread of execution
needs to send a stop request and join that running thread. Otherwise the
std::thread data member will terminate in its assignment operator.

Co-authored-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/std/thread (jthread::operator=(jthread&&)): Transfer
	any existing state to a temporary that will request a stop and
	then join.
	* testsuite/30_threads/jthread/jthread.cc: Test move assignment.
2020-11-11 11:13:31 +00:00
..
algorithm
any
array libstdc++: Remove <debug/array> 2020-11-09 21:20:01 +01:00
atomic
bit libstdc++: Remove redundant check for zero in std::__popcount 2020-11-09 14:54:29 +00:00
bitset
charconv
chrono
codecvt
complex
concepts
condition_variable
coroutine
deque
execution
filesystem
forward_list
fstream
functional libstdc++: Remove <debug/array> 2020-11-09 21:20:01 +01:00
future libstdc++: Fix multiple definitions of std::exception_ptr functions [PR 97729] 2020-11-05 18:01:25 +00:00
iomanip
ios
iosfwd
iostream
istream
iterator
limits
list
locale
map
memory
memory_resource
mutex libstdc++: Rewrite std::call_once to use futexes [PR 66146] 2020-11-03 18:44:49 +00:00
numbers
numeric
optional libstdc++: Fix constraints on std::optional comparisons [PR 96269] 2020-11-05 19:09:22 +00:00
ostream libstdc++: Implement std::emit_on_flush etc. 2020-11-11 00:19:40 +00:00
queue
random
ranges libstdc++: Don't initialize from *this inside some views [PR97600] 2020-10-30 20:33:19 -04:00
ratio
regex
scoped_allocator
set
shared_mutex
span libstdc++: Remove <debug/array> 2020-11-09 21:20:01 +01:00
sstream libstdc++: Reorder constructors in <sstream> 2020-11-10 19:22:48 +00:00
stack
stdexcept
stop_token libstdc++: Use helper type for checking thread ID 2020-11-11 11:13:31 +00:00
streambuf
string
string_view
syncstream libstdc++: Implement std::emit_on_flush etc. 2020-11-11 00:19:40 +00:00
system_error
thread libstdc++: Assigning to a joinable std::jthread calls std::terminate 2020-11-11 11:13:31 +00:00
tuple
type_traits libstdc++: Define type traits for wchar_t even when libc support missing 2020-11-01 11:39:07 +00:00
typeindex
unordered_map
unordered_set
utility
valarray
variant
vector
version libstdc++: Add c++2a <syncstream> 2020-11-02 10:41:32 -08:00