As of mid-2023, libc++ has no support for jthread, and no imminent plans to add support. This is despite the fact that Microsoft STL drafted support in 2019, before the standard was even completed, and GCC's libstdc++ added support in 2020 shortly after.
There are several incredibly useful features for GUI programming which jthread support brings to the table:
std::jthread
, of course - thread with stop requestable and which automatically joins on destructionstd::stop_token
- shared token associated with a stop sourcestd::condition_variable_any::wait(lock, stoken, pred)
- cancelable condition variable wait
These tools trivialize several problems which frequently come up when writing highly threaded programs. Yet even though clang can compile code using libstdc++, which does support these without issue, libc++ does not support them.
One can only speculate that the team at Apple developing LLVM is more focused on the quality of life of Swift developers than C++ developers.