Porting shim to the rescue! This code emulates a subset of the Win32 threading APIs as a wrapper on top of WinRT ThreadPool:
- CreateThread
- CREATE_SUSPENDED and ResumeThread
- Partial support for SetThreadPriority (see comments in the header for details)
- Sleep
- Thread local storage (TlsAlloc, TlsFree, TlsGetValue, TlsSetValue, plus see header comments about TlsShutdown)
Get it here: ThreadEmulation.zip
I recommend only using this for porting legacy code. When writing new Metro applications, it is better to directly use WinRT ThreadPool.
Source