I am trying to learn std::threads from C++11 to make a threading system.
I was wondering if there is a way to stop a thread from running (N
The C++ std::thread class is really just a minimal interface layered on top of some more complete implementation-defined threading package. As such, it only defines a tiny amount of functionality -- creating new threads, detach, and join. That's pretty much it -- there's no standard way of managing, scheduling, stopping/starting/killing threads or doing much else.
There is a native_handle method that returns an implementation-defined type which can probably be used to do what you want, depending on the implementation.