Don't allow Join to return due to an APC (#3970)
authorJoshua Peterson <petersonjm1@gmail.com>
Sat, 3 Dec 2016 22:10:25 +0000 (17:10 -0500)
committerLudovic Henry <ludovic@xamarin.com>
Sat, 3 Dec 2016 22:10:25 +0000 (17:10 -0500)
commit971f5ff4ed3f91aa6820ce1bdf40d4d3459be6e3
tree3b68b13776d2e18c00895e15acd12afec50dcdf4
parent53fa02470c64885e5856627cf70f2778b34992cd
Don't allow Join to return due to an APC (#3970)

* Don't allow Join to return due to an APC

On Windows, Thread.Join does an alertable wait. If the thread calling
Join gets an APC during the call, Join will incorrectly return. Instead,
the code should handle the APC and continue waiting.

* Do an uninterrupted wait during thread join.

Mimic the behavior of mono_wait_uninterrupted, but for a single thread
that we want to join.

* Make some style changes suggested in the PR.
mono/metadata/threads.c