[mono-threads] Move platform unregister after detach (#3604)
authorLudovic Henry <ludovic@xamarin.com>
Thu, 22 Sep 2016 20:09:29 +0000 (22:09 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Sep 2016 20:09:29 +0000 (22:09 +0200)
commit828045d259d2a6837f8c82931b179e8d0b1847b2
treee841e59f7f060a76ea2da6cdf7d1213b3f0b1e9c
parent9ed7ac51250570760ace2e29acc0a4a16f3e541e
[mono-threads] Move platform unregister after detach (#3604)

This is important as platform unregister is where we signal the thread handle, and that should be done as late as possible, but still before we switch the thread state to DETACHED and remove it from the thread list.

The fact that we do under the suspend lock shouldn't be an issue as we shouldn't call in any other code than w32handle code.
mono/utils/mono-threads.c