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

Unified Diff: src/cancelable-task.h

Issue 1460763004: Fix protocol for aborting and waiting for cancelable tasks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 1 month 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 a6973d1e90e38907a439e7f6c6e6bed7299f70f6..a8387fcd950008e0b416e4cb09c6477a14334147 100644
--- a/src/cancelable-task.h
+++ b/src/cancelable-task.h
@@ -43,6 +43,10 @@ class CancelableTaskManager {
void CancelAndWait();
private:
+ // Only called by {Cancelable} destructor. The task is done with executing,
+ // but needs to be removed.
+ void RemoveFinishedTask(uint32_t id);
+
// To mitigate the ABA problem, the api refers to tasks through an id.
uint32_t task_id_counter_;
@@ -54,6 +58,8 @@ class CancelableTaskManager {
base::ConditionVariable cancelable_tasks_barrier_;
base::Mutex mutex_;
+ 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