Wait for the native thread to die in Thread.Join() on Windows
authorNiklas Therning <niklas@therning.org>
Tue, 5 Sep 2017 09:15:22 +0000 (11:15 +0200)
committerNiklas Therning <niklas@therning.org>
Tue, 5 Sep 2017 09:18:59 +0000 (11:18 +0200)
commit95f0800520afb6d7f28eba2178ae3b7c1d104c00
tree45a6aec29e60d767be72353946d1116dc86bef8a
parent90450cc1480d4b76732fd725da06d75da40665c6
Wait for the native thread to die in Thread.Join() on Windows

This is the behavior of .NET. After this patch the code on Mono for Windows
will make sure the underlying native thread of a managed thread has died
before Thread.Join() returns.

This PR builds on PR #5454 but makes it Windows specific. PR #5454 was
reverted since it caused crashes on some Unix platforms.
mono/metadata/threads.c