[Bug libstdc++/94996] jthread should stop and join the associated thread before being assigned.

hotwatermorning at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri May 8 08:27:51 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94996

--- Comment #1 from hotwatermorning at gmail dot com ---
Note: The expected behavior is that the associated thread is stopped and joined
at `th = std::jthread();` and the following assertion passes, but the current
implementation aborts at `th = std::jthread();` because the internal _M_thread
data-member is move-assigned while joinable() == true.


More information about the Gcc-bugs mailing list