Skip to content

Commit

Permalink
make join() properly reset state after completing
Browse files Browse the repository at this point in the history
  • Loading branch information
jmar777 committed Nov 21, 2013
1 parent 1f44d79 commit a69e874
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/suspend.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ Suspender.prototype.join = function join() {
results[i] = forkValue[1]; results[i] = forkValue[1];
} }
} }
// reset fork/join state
this.pendingJoin = false;
this.pendingForks = 0;
this.forkValues.length = 0;


// resume the generator with our fork/join results
this.resume(err, results); this.resume(err, results);
}; };

0 comments on commit a69e874

Please sign in to comment.