Merge pull request #4434 from BrzVlad/fix-unload-hang
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 27 Feb 2017 20:05:27 +0000 (22:05 +0200)
committerGitHub <noreply@github.com>
Mon, 27 Feb 2017 20:05:27 +0000 (22:05 +0200)
[threads] Don't ignore abort requests in abort protected blocks

mono/metadata/threads.c

index c756a06c94082952563abe49d4326798d669fb8a..3461f81e325c6dde6063bb487799a5d24b4baf02 100644 (file)
@@ -4844,13 +4844,6 @@ async_abort_critical (MonoThreadInfo *info, gpointer ud)
        if (mono_get_eh_callbacks ()->mono_install_handler_block_guard (mono_thread_info_get_suspend_state (info)))
                return MonoResumeThread;
 
-       /*
-       The target thread is running at least one protected block, which must not be interrupted, so we give up.
-       The protected block code will give them a chance when appropriate.
-       */
-       if (mono_thread_get_abort_prot_block_count (thread) > 0)
-               return MonoResumeThread;
-
        /*someone is already interrupting it*/
        if (!mono_thread_set_interruption_requested (thread))
                return MonoResumeThread;