Skip to content

Commit

Permalink
I made a mistake about continuable, fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Dec 7, 2010
1 parent c1766b0 commit fb448a9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions sum.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fb448a9

Please sign in to comment.