Win32 threads: remove functions forbidden on Windows Store
Do not create a suspended thread so ResumeThread becomes unnecessary. Busy loop over thread handle if by misfortune the thread ends before _beginthreadex has returned. Do not use SetThreadPriority on Windows Store. Set the cancelled thread bit outside of the APC procedure. APC is still used to wake up the cancelled thread when it is in an alertable state (SleepEx or WaitForMultipleObjectsEx). Since QueueUserAPC is forbidden on Windows Store we check the cancelled state every 50 ms.
Showing with 77 additions and 19 deletions