benchmark: use generator delegation
This commit is contained in:
parent
d3e3c4d117
commit
3c9dcde11b
1 changed files with 2 additions and 2 deletions
|
@ -10,14 +10,14 @@ console.log(' %s middleware', n);
|
|||
|
||||
while (n--) {
|
||||
app.use(function *(next){
|
||||
yield next;
|
||||
yield *next;
|
||||
});
|
||||
}
|
||||
|
||||
var body = new Buffer('Hello World');
|
||||
|
||||
app.use(function *(next){
|
||||
yield next;
|
||||
yield *next;
|
||||
this.body = body;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue