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

Unified Diff: base/message_loop_proxy.h

Issue 6812016: Clarify documentation about when a task may fail to post to a message loop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop_proxy.h
diff --git a/base/message_loop_proxy.h b/base/message_loop_proxy.h
index e750f2ac996de2472823e8bea29751e0c55f6cb4..07bca646f56ab9e676d4b8ab51c50f4361a23250 100644
--- a/base/message_loop_proxy.h
+++ b/base/message_loop_proxy.h
@@ -27,8 +27,10 @@ class BASE_API MessageLoopProxy
// either post the Task to the MessageLoop (if it's still alive), or to
// delete the Task otherwise.
// They return true iff the thread existed and the task was posted. Note that
- // even if the task is posted, there's no guarantee that it will run, since
- // the target thread may already have a Quit message in its queue.
+ // even if the task is posted, there's no guarantee that it will run; for
+ // example the target loop may already be quitting, or in the case of a
+ // delayed task a Quit message may preempt it in the message loop queue.
+ // Conversely, a return value of false is a guarantee the task will not run.
virtual bool PostTask(const tracked_objects::Location& from_here,
Task* task) = 0;
virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698