* This should be used at the end of embedding code which calls into managed code, and which
* can be called from pthread dtors, like dealloc: implementations in objective-c.
*/
-void
+mono_bool
mono_thread_detach_if_exiting (void)
{
if (mono_thread_info_is_exiting ()) {
if (thread) {
mono_thread_detach_internal (thread);
mono_thread_info_detach ();
+ return TRUE;
}
}
+ return FALSE;
}
void
MONO_API mono_bool mono_thread_is_foreign (MonoThread *thread);
-extern MONO_API void mono_thread_detach_if_exiting (void);
+extern MONO_API mono_bool mono_thread_detach_if_exiting (void);
MONO_END_DECLS