[runtime] Mark the ThreadPool.PerformWaitCallback () method as save_lmf, so ThreadAbo...
authorZoltan Varga <vargaz@gmail.com>
Tue, 22 Nov 2016 16:24:51 +0000 (11:24 -0500)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2016 16:24:51 +0000 (11:24 -0500)
mono/metadata/threadpool-ms.c

index 5e6f28dfc77dc8414228cc2710b287b968af1f65..2a1629d87f9627e201ade0e10bf5ae1e50b84486 100644 (file)
@@ -675,6 +675,12 @@ worker_thread (gpointer data)
                g_assert (tpdomain->threadpool_jobs >= 0);
                tpdomain->threadpool_jobs ++;
 
+               /*
+                * This is needed so there is always an lmf frame in the runtime invoke call below,
+                * so ThreadAbortExceptions are caught even if the thread is in native code.
+                */
+               mono_defaults.threadpool_perform_wait_callback_method->save_lmf = TRUE;
+
                domains_unlock ();
 
                mono_thread_push_appdomain_ref (tpdomain->domain);