[threadpool] Fix `MonoTests.runtime.unload-appdomain-on-shutdown.exe` (#4135)
authorLudovic Henry <ludovic@xamarin.com>
Tue, 13 Dec 2016 21:53:03 +0000 (16:53 -0500)
committerGitHub <noreply@github.com>
Tue, 13 Dec 2016 21:53:03 +0000 (16:53 -0500)
commit8882af17e6ee543c94843b0333c814780d9056d3
tree9efc6c45234d9d44b4fe7958164ea64e514b3904
parent339b8a166c855162ca9a4cb21270beff896dbfe0
[threadpool] Fix `MonoTests.runtime.unload-appdomain-on-shutdown.exe` (#4135)

* [threadpool] Increase and decrease refcount when removing domain

* [threadpool] Fix unload-appdomain-on-shutdown.exe

If the threadpool is not initialized, there is no need to initialize it, as no worker is going to start in the domain because mono_domain_is_unloading would return TRUE.
mono/metadata/threadpool.c