mardi 26 avril 2016

Retrieve the Windows thread identifier from the std::thread::id structure

I have access to std::thread::id in may code, and need to use some native functions that receive as argument ThreadId as DWORD ( same as returned by GetCurrentThreadId() ).

I cannot find any way to convert this. Closest thing could find is std::thread has that has a native_handle. But still no way to create std::thread from std::thread::id and still too far from what I need.

There is something that I miss ? or the gap between standard portable thread functions and native functions is so big that standard api is unusable ?

Aucun commentaire:

Enregistrer un commentaire