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

Unified Diff: src/sweeper-thread.cc

Issue 252123006: Wait for sweeper threads in incremental marking step when sweeper threads are done sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « src/sweeper-thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sweeper-thread.cc
diff --git a/src/sweeper-thread.cc b/src/sweeper-thread.cc
index 5a50c643d6a3e7be5adc363252bd0f180ff1d016..e8c8cd68d8489644c9330681a514c6800fc350a5 100644
--- a/src/sweeper-thread.cc
+++ b/src/sweeper-thread.cc
@@ -66,6 +66,15 @@ void SweeperThread::WaitForSweeperThread() {
}
+bool SweeperThread::SweepingCompleted() {
+ bool value = end_sweeping_semaphore_.WaitFor(TimeDelta::FromSeconds(0));
+ if (value) {
+ end_sweeping_semaphore_.Signal();
+ }
+ return value;
+}
+
+
int SweeperThread::NumberOfThreads(int max_available) {
if (!FLAG_concurrent_sweeping && !FLAG_parallel_sweeping) return 0;
if (FLAG_sweeper_threads > 0) return FLAG_sweeper_threads;
« no previous file with comments | « src/sweeper-thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698