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

Unified Diff: base/cancelable_callback.h

Issue 2709883003: Elaborate on the CancelableCallback docs (Closed)
Patch Set: Comment change Created 3 years, 10 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/cancelable_callback.h
diff --git a/base/cancelable_callback.h b/base/cancelable_callback.h
index 13cbd0c2139e10755e863bd3402a4ff4459db0e3..b91f7c0d6360f29816cf6b0985df70fb77510107 100644
--- a/base/cancelable_callback.h
+++ b/base/cancelable_callback.h
@@ -7,17 +7,23 @@
// wrapped callback until this object is destroyed or Reset()/Cancel() are
// called.
//
-// NOTE:
+// NOTES:
//
// Calling CancelableCallback::Cancel() brings the object back to its natural,
// default-constructed state, i.e., CancelableCallback::callback() will return
// a null callback.
//
+// It is NOT allowed to call CancelableCallback::Cancel() or
+// CancelableCallback::Reset() from the wrapped callback.
+//
// THREAD-SAFETY:
//
-// CancelableCallback objects must be created on, posted to, cancelled on, and
+// CancelableCallback objects must be posted to, cancelled on, reset on, and
// destroyed on the same thread.
//
+// CancelableCallback objects are allowed to be constructed on a different
emaxx 2017/03/01 03:37:54 Hmm, thinking more on this, this added comment is
+// thread than on which they will be used later.
+//
//
// EXAMPLE USAGE:
//
« 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