/**
* Use the given middleware `fn`.
*
* @param {GeneratorFunction} fn
* @return {Application} self
* @api public
*/app.use=function(fn){if(!this.experimental){// es7 async functions are not allowed,// so we have to make sure that `fn` is a generator functionassert(fn&&'GeneratorFunction'==fn.constructor.name,'app.use() requires a generator function');}debug('use %s',fn._name||fn.name||'-');// 主要就是做这个事情// 根据上面的assert，这里的fn均为generator functionthis.middleware.push(fn);returnthis;};