cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject cordova-wp8 git commit: Use WP8 thread pool for each command, instead of starting new thread
Date Thu, 22 Jan 2015 12:00:29 GMT
Repository: cordova-wp8
Updated Branches:
  refs/heads/master 86cbcd912 -> 7786627ef


Use WP8 thread pool for each command, instead of starting new thread

github: close #72


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/7786627e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/7786627e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/7786627e

Branch: refs/heads/master
Commit: 7786627eff39cec5253e8b13874611b65cf9e631
Parents: 86cbcd9
Author: Chris Brody <chris.brody@gmail.com>
Authored: Wed Jan 21 14:27:29 2015 +0100
Committer: sgrebnov <v-segreb@microsoft.com>
Committed: Thu Jan 22 14:59:26 2015 +0300

----------------------------------------------------------------------
 template/cordovalib/NativeExecution.cs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/7786627e/template/cordovalib/NativeExecution.cs
----------------------------------------------------------------------
diff --git a/template/cordovalib/NativeExecution.cs b/template/cordovalib/NativeExecution.cs
index fe35aea..d26bb3e 100644
--- a/template/cordovalib/NativeExecution.cs
+++ b/template/cordovalib/NativeExecution.cs
@@ -124,7 +124,7 @@ namespace WPCordovaClassLib.Cordova
 
                 bc.OnCustomScript += OnCustomScriptHandler;
 
-                ThreadStart methodInvokation = () =>
+                Windows.System.Threading.ThreadPool.RunAsync((workItem) =>
                 {
                     try
                     {
@@ -141,9 +141,7 @@ namespace WPCordovaClassLib.Cordova
                         this.OnCommandResult(commandCallParams.CallbackId, new PluginResult(PluginResult.Status.INVALID_ACTION));
                         return;
                     }
-                };
-
-                new Thread(methodInvokation).Start();
+                });
 
             }
             catch (Exception ex)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message