Skip to content
  • Rafaël Carré's avatar
    Win32 threads: remove functions forbidden on Windows Store · a1500776
    Rafaël Carré authored
    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.
    a1500776