Rebased and made it again so that errors in `apply_thread_priority` are not propagated back, since some games had trouble with that.
Also added a comment to explain the rationale behind this and why it is safe to ignore an uninitialized unix tid here.