libyal/libcthreads

CreateThread/ExitThread

thims opened this issue · 6 comments

Consider using _beginthreadex/_endthreadex if possible: this will prevent issues when using CRT in threads.

Not sure these functions seem to come with some limitations.
https://msdn.microsoft.com/en-us/library/kdzttdcb.aspx

This is all about WRT/Windows Store apps.

Not sure what you mean, can you be a bit more verbose?

There is one limitation: you can't use these functions in Windows Store apps (special kind of Win8/8.1 apps). But you really don't need the library like this in Store Apps.

So the following article indicates the only value of using _beginthreadex/_endthreadex is that it handles signal correctly, see: http://support.microsoft.com/en-us/kb/104641/en-us

Since the idea is to use the Visual Studio CRT as little as possible, I don't think it is of any value to use these functions.

By the way, beginning from VC++ 2015 _beginthreadex keeps reference to thread module that prevents the unloading of the module until the thread execution is finished.