The basic idea is pretty simple: a
std::interrupt_token parameter is passed to the callable object used to spawn the thread, and this token can be used to check a request of interruption. A C++ implementation is already available, and it looks like it is easily portable to native Rust.
Do you think that it could be worth implementing this? Not necessarily in the std lib, but maybe crossbeam could gain a nice additional behaviour.
(I wanted to check is something similar was already available, but it looks like docs.rs is not loading, at least for me)