summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 22:03:00 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 22:03:00 +0000
commit5fc9793fc153b3be2376ebfd138ec68e75215cf8 (patch)
tree10e7f4e84f3ea42515ce8c3b5342f705b15d0aa6 /ppapi
parentfce6d8fa3271b4c3614be544d7a25344d7701260 (diff)
downloadchromium_src-5fc9793fc153b3be2376ebfd138ec68e75215cf8.zip
chromium_src-5fc9793fc153b3be2376ebfd138ec68e75215cf8.tar.gz
chromium_src-5fc9793fc153b3be2376ebfd138ec68e75215cf8.tar.bz2
Add note about blocking completion callbacks on the main thread.
BUG=None TEST=None Review URL: http://codereview.chromium.org/7778018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/cpp/completion_callback.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/ppapi/cpp/completion_callback.h b/ppapi/cpp/completion_callback.h
index 0a4f5bf..7dee4db 100644
--- a/ppapi/cpp/completion_callback.h
+++ b/ppapi/cpp/completion_callback.h
@@ -22,6 +22,9 @@ class CompletionCallback {
/// <code>CompletionCallback</code> that can be passed to a method to
/// indicate that the calling thread should be blocked until the asynchronous
/// operation corresponding to the method completes.
+ ///
+ /// <strong>Note:</strong> Blocking completion callbacks are only allowed from
+ /// from background threads.
CompletionCallback() {
cc_ = PP_BlockUntilComplete();
}
@@ -113,7 +116,7 @@ class CompletionCallback {
///
/// <strong>Example:</strong>
///
- /// <code>
+ /// @code
///
/// int32_t OpenURL(pp::URLLoader* loader,
/// pp::URLRequestInfo* url_request_info,
@@ -123,7 +126,7 @@ class CompletionCallback {
/// return loader->Open(*loader, *url_request_info, cc);
/// }
///
- /// </code>
+ /// @endcode
///
/// @param[in] result PP_OK_COMPLETIONPENDING or the result of the completed
/// operation to be passed to the callback function. PP_OK_COMPLETIONPENDING
@@ -172,7 +175,7 @@ CompletionCallback BlockUntilComplete();
///
/// <strong>Example: </strong>
///
-/// <code>
+/// @code
///
/// class MyHandler {
/// public:
@@ -231,7 +234,7 @@ CompletionCallback BlockUntilComplete();
/// int64_t offset_;
/// };
///
-/// </code>
+/// @endcode
///
template <typename T, typename RefCount = NonThreadSafeRefCount>
class CompletionCallbackFactory {