summaryrefslogtreecommitdiffstats
path: root/base/sequenced_task_runner.h
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-18 00:32:18 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-18 00:32:18 +0000
commitdeb682b1faa01604703d9fd659f8469b092dfd9e (patch)
tree0b93c11e571555fd8b84439b0e1e933fe1e9514c /base/sequenced_task_runner.h
parenta0a5a3a03e51c8d8cf6fa2e4bd1d55ba72a836cc (diff)
downloadchromium_src-deb682b1faa01604703d9fd659f8469b092dfd9e.zip
chromium_src-deb682b1faa01604703d9fd659f8469b092dfd9e.tar.gz
chromium_src-deb682b1faa01604703d9fd659f8469b092dfd9e.tar.bz2
Add comments about memory behavior of SWP tasks with the same sequence token
Clarify comments about memory guarantees in SequencedTaskRunner. Make SWPSequencedTaskRunner::PostNonNestableDelayedTask forward to PostDelayedTask (to have the same shutdown behavior). Add comment in message_loop.h clarifying the equivalence of PostTask() and PostDelayedTask() with a zero delay. BUG=165590 Review URL: https://codereview.chromium.org/11554010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sequenced_task_runner.h')
-rw-r--r--base/sequenced_task_runner.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/base/sequenced_task_runner.h b/base/sequenced_task_runner.h
index 2e999c7..f6ca646 100644
--- a/base/sequenced_task_runner.h
+++ b/base/sequenced_task_runner.h
@@ -18,8 +18,8 @@ namespace base {
//
// Summary
// -------
-// Barring delayed/non-nestable tasks, tasks posted will run one by
-// one in FIFO order.
+// Non-nested tasks with the same delay will run one by one in FIFO
+// order.
//
// Detailed guarantees
// -------------------
@@ -36,18 +36,19 @@ namespace base {
//
// - Given two tasks T2 and T1, T2 will start after T1 starts if:
//
-// * T2 is posted after T1;
+// * T2 is posted after T1; and
// * T2 has equal or higher delay than T1; and
// * T2 is non-nestable or T1 is nestable.
//
// - If T2 will start after T1 starts by the above guarantee, then
-// T2 will start after T1 finishes if:
+// T2 will start after T1 finishes and is destroyed if:
//
// * T2 is non-nestable, or
// * T1 doesn't call any task-running methods.
//
// - If T2 will start after T1 finishes by the above guarantee, then
-// all memory changes in T1 will be visible to T2.
+// all memory changes in T1 and T1's destruction will be visible
+// to T2.
//
// - If T2 runs nested within T1 via a call to the task-running
// method M, then all memory changes in T1 up to the call to M