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

Unified Diff: src/cancelable-task.h

Issue 2413203004: [heap] Cancel tasks before tearing down the heap. (Closed)
Patch Set: cancel new tasks Created 4 years, 2 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 | src/cancelable-task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cancelable-task.h
diff --git a/src/cancelable-task.h b/src/cancelable-task.h
index b1d62aad4bd595428d0b73da7497b67bca15a712..74afa6019cf9123d689aae39391854b6be19a1ca 100644
--- a/src/cancelable-task.h
+++ b/src/cancelable-task.h
@@ -40,7 +40,8 @@ class CancelableTaskManager {
bool TryAbort(uint32_t id);
// Cancels all remaining registered tasks and waits for tasks that are
- // already running.
+ // already running. After this function is called all subsequent new tasks
+ // will be cancelled on creation.
void CancelAndWait();
private:
@@ -59,6 +60,8 @@ class CancelableTaskManager {
base::ConditionVariable cancelable_tasks_barrier_;
base::Mutex mutex_;
+ bool canceled_;
+
friend class Cancelable;
DISALLOW_COPY_AND_ASSIGN(CancelableTaskManager);
« no previous file with comments | « no previous file | src/cancelable-task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698