What is the correct way in the post C++11 world for setting the priority of an instance of std::thread
Is there a portable way of doing this that works at least in Windows and POSIX (Linux) environments?
Or is it a matter of getting a handle and using whatever native calls are available for the particular OS?
There's no way to set thread priorities via the C++11 library. I don't think this is going to change in C++14, and my crystal ball is too hazy to comment on versions after that.
In POSIX, pthread_setschedparam(thread.native_handle(), policy, {priority});
I don't know the equivalent Windows function, but I'm sure there must be one.