benchmark: use generator delegation

This commit is contained in:
Jonathan Ong 2013-12-24 22:12:48 -08:00
parent d3e3c4d117
commit 3c9dcde11b

View file

@ -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;
});