Permalink
Browse files

I made a mistake about continuable, fixed

  • Loading branch information...
1 parent c1766b0 commit fb448a9a9e9fda646e46e7df0bdfc0ffe923ff86 @liuliu committed Dec 7, 2010
Showing with 11 additions and 11 deletions.
  1. +11 −11 sum.js
View
22 sum.js
@@ -36,18 +36,18 @@ if (parallable === undefined) {
var scope = { "shared" : {} };
var ctrl = funct.apply(scope, params);
if (async) {
- var executed = 0;
- var outputs = new Array(worker_num);
- var inputs = ctrl.pre.apply(scope, [worker_num]);
- /* sanitize scope shared because for Chrome/WebKit, worker only support JSONable data */
- for (i in scope.shared)
- /* delete function, if any */
- if (typeof scope.shared[i] == "function")
- delete scope.shared[i];
- /* delete DOM object, if any */
- else if (scope.shared[i].tagName !== undefined)
- delete scope.shared[i];
return function (complete, error) {
+ var executed = 0;
+ var outputs = new Array(worker_num);
+ var inputs = ctrl.pre.apply(scope, [worker_num]);
+ /* sanitize scope shared because for Chrome/WebKit, worker only support JSONable data */
+ for (i in scope.shared)
+ /* delete function, if any */
+ if (typeof scope.shared[i] == "function")
+ delete scope.shared[i];
+ /* delete DOM object, if any */
+ else if (scope.shared[i].tagName !== undefined)
+ delete scope.shared[i];
for (i = 0; i < worker_num; i++) {
var worker = new Worker(file);
worker.onmessage = (function (i) {

0 comments on commit fb448a9

Please sign in to comment.