[threadpool] Fix hang on domain unloading (#3904)
commitd68a5479a7466071f7c4c8be38cc302ff7df5265
authorLudovic Henry <ludovic@xamarin.com>
Mon, 7 Nov 2016 20:11:22 +0000 (7 15:11 -0500)
committerGitHub <noreply@github.com>
Mon, 7 Nov 2016 20:11:22 +0000 (7 15:11 -0500)
treef5bebefb773916efd4008b48cf58f7f199dab50b
parent8e8dcd24e46bedde8afc0f8b50fc4d2b137212f3
[threadpool] Fix hang on domain unloading (#3904)

Because we wouldn't return the correct ThreadPoolDomain for the requested domain, we would simply wait on the last inserted MonoDomain. This would lead to a hang when unloading the domain, as we wouldn't wait on the correct domain.
mono/metadata/threadpool-ms.c
mono/tests/Makefile.am
mono/tests/appdomain-threadpool-unload.cs [new file with mode: 0644]