Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlad Brezae <brezaevlad@gmail.com>2017-02-25 03:59:14 +0300
committerVlad Brezae <brezaevlad@gmail.com>2017-02-25 03:59:14 +0300
commitbc25f308cabad9bb333a1d596fe89881205cc82f (patch)
treec02ae4b370cc45b0c51b01d80bcde5f9d90b4fb1
parent17c5a00c59613a7c5dbce76af5107a14c3e89f76 (diff)
[threads] Don't ignore abort requests in abort protected blocks
Either interrupt or set the interrupt_deferred flag, so the thread can handle the request later in the future. Otherwise we are left with a thread that has an AbortRequested set on its state that it is never processed and future abort requests are ignored due to the presence of this flag.
-rw-r--r--mono/metadata/threads.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index 968bd091061..a52c02d2ebf 100644
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -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;