[threads] Detach thread in all possible cases (#3584)
commit031bb67812c3a87313a7a11e79916c93b8e9fa16
authorLudovic Henry <ludovic@xamarin.com>
Tue, 20 Sep 2016 15:12:37 +0000 (20 17:12 +0200)
committerGitHub <noreply@github.com>
Tue, 20 Sep 2016 15:12:37 +0000 (20 17:12 +0200)
tree71bc75aa282086ec46b5130bc46f9092f946f354
parent38bf98614251a8b8a1e7dd06e59b17ff2f956305
[threads] Detach thread in all possible cases (#3584)

* [threads] Use mono_thread_detach_internal to factor code

* [threads] Make sure we detach the thread before exiting

* [threads] Add mono_thread_internal_current_is_attached

* [threads] Ensure we detach the thread on Boehm
mono/metadata/boehm-gc.c
mono/metadata/sgen-mono.c
mono/metadata/threads-types.h
mono/metadata/threads.c