You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e301847
Browse filesBrowse the repository at this point in the historyBrowse files
Abort async suspend request on failure doing preemptive suspend. (#15486)
When a preemptive suspend fails, state machine will get into an invalid
state and the thread is in an unknown state (running/self-suspended). In case of
failure in mono_threads_suspend_begin_async_suspend, a new method should be
called, mono_threads_transition_abort_async_suspend making sure state machine
reflects correct thread state as well as reporting correct result to initial
caller of mono_threads_suspend_begin_async_suspend.
return TRUE; //aborting thread suspend request succeded, thread is running.
610
+
611
+
/*
612
+
STATE_RUNNING: A thread cannot escape suspension once requested.
613
+
STATE_ASYNC_SUSPENDED: There can be only one suspend initiator at a given time, meaning this state should have been visible on the first stage of suspend.
614
+
STATE_BLOCKING: If a thread is subject to preemptive suspend, there is no race as the resume initiator should have suspended the thread to STATE_BLOCKING_ASYNC_SUSPENDED or STATE_BLOCKING_SELF_SUSPENDED before resuming.
615
+
With cooperative suspend, there are no finish_async_suspend transitions since there's no path back from asyns_suspend requested to running.
616
+
STATE_BLOCKING_ASYNC_SUSPENDED: There can only be one suspend initiator at a given time, meaning this state should have ben visible on the first stage of suspend.
617
+
*/
618
+
default:
619
+
mono_fatal_with_history ("Cannot transition thread %p from %s with ABORT_ASYNC_SUSPEND", mono_thread_info_get_tid (info), state_name (cur_state));
620
+
}
621
+
}
622
+
570
623
/*
571
624
This performs the last step of preemptive suspend.
0 commit comments