[vm] Fix race between MarkWorkerAsBlocked/Unblocked.
TEST=vm/dart/isolates/many_isolates_blocked_at_process_run_sync_test Change-Id: I3efde84cae4a9ea25c75f2f735d5f7b74c22237d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417561 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
committed by
Commit Queue
parent
94b8c80eda
commit
9f723d759d
@@ -1373,6 +1373,10 @@ void Thread::UnwindScopes(uword stack_marker) {
|
||||
}
|
||||
|
||||
void Thread::HandleStolen() {
|
||||
{
|
||||
// To make sure we're sequenced after MarkWorkerAsBlocked.
|
||||
MonitorLocker ml(isolate_group()->thread_registry()->threads_lock());
|
||||
}
|
||||
isolate_group()->IncreaseMutatorCount(this, /*is_nested_reenter=*/false,
|
||||
/*was_stolen=*/true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user