Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: runtime/vm/dart_api_state.cc

Issue 2349853002: VM: Fix for deadlock with background tasks. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/gc_sweeper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_state.cc
diff --git a/runtime/vm/dart_api_state.cc b/runtime/vm/dart_api_state.cc
index ed6ac3ed19e2671b5fc6fcd46e12ff721ce4da2c..6d0967d026a073d5f620ef1e2e7e925cbcb03c46 100644
--- a/runtime/vm/dart_api_state.cc
+++ b/runtime/vm/dart_api_state.cc
@@ -22,7 +22,6 @@ BackgroundFinalizer::BackgroundFinalizer(Isolate* isolate,
PageSpace* old_space = isolate->heap()->old_space();
MonitorLocker ml(old_space->tasks_lock());
old_space->set_tasks(old_space->tasks() + 1);
- ml.Notify();
}
@@ -49,7 +48,7 @@ void BackgroundFinalizer::Run() {
PageSpace* old_space = isolate_->heap()->old_space();
MonitorLocker ml(old_space->tasks_lock());
old_space->set_tasks(old_space->tasks() - 1);
- ml.Notify();
+ ml.NotifyAll();
}
}
« no previous file with comments | « no previous file | runtime/vm/gc_sweeper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698