Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Use WP8 thread pool for each command, instead of starting new thread
github: close #72
  • Loading branch information
Chris Brody authored and sgrebnov committed Jan 22, 2015
1 parent 86cbcd9 commit 7786627eff39cec5253e8b13874611b65cf9e631
Showing 1 changed file with 2 additions and 4 deletions.
@@ -124,7 +124,7 @@ public void ProcessCommand(CordovaCommandCall commandCallParams)

bc.OnCustomScript += OnCustomScriptHandler;

ThreadStart methodInvokation = () =>
Windows.System.Threading.ThreadPool.RunAsync((workItem) =>
{
try
{
@@ -141,9 +141,7 @@ public void ProcessCommand(CordovaCommandCall commandCallParams)
this.OnCommandResult(commandCallParams.CallbackId, new PluginResult(PluginResult.Status.INVALID_ACTION));
return;
}
};

new Thread(methodInvokation).Start();
});

}
catch (Exception ex)

0 comments on commit 7786627

Please sign in to comment.