cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject ios commit: Add more comments to CDVCommandDelegate.h.
Date Wed, 31 Oct 2012 02:37:23 GMT
Updated Branches:
  refs/heads/master e545a4ba9 -> d0837cc8b


Add more comments to CDVCommandDelegate.h.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/d0837cc8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/d0837cc8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/d0837cc8

Branch: refs/heads/master
Commit: d0837cc8b7fbf0cef2adee159f15fea697d0249a
Parents: e545a4b
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Oct 30 22:36:59 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Oct 30 22:36:59 2012 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVCommandDelegate.h |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/d0837cc8/CordovaLib/Classes/CDVCommandDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandDelegate.h b/CordovaLib/Classes/CDVCommandDelegate.h
index 5edb39c..8f41071 100644
--- a/CordovaLib/Classes/CDVCommandDelegate.h
+++ b/CordovaLib/Classes/CDVCommandDelegate.h
@@ -33,12 +33,16 @@
 // will result in bogus callbacks being made.
 - (BOOL)execute:(CDVInvokedUrlCommand*)command CDV_DEPRECATED(2.2, "Use direct method calls
instead.");
 
-// Sends a plugin result to the JS.
+// Sends a plugin result to the JS. This is thread-safe.
 - (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId;
-// Evaluates the given JS.
+// Evaluates the given JS. This is thread-safe.
 - (void)evalJs:(NSString*)js;
+// Can be used to evaluate JS right away instead of scheduling it on the run-loop.
+// This is required for dispatch resign and pause events, but should not be used
+// without reason. Without the run-loop delay, alerts used in JS callbacks may result
+// in dead-lock. This method must be called from the UI thread.
 - (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
-// Runs the given block on a background thread.
+// Runs the given block on a background thread using a shared thread-pool.
 - (void)runInBackground:(void (^)())block;
 
 @end


Mime
View raw message