求高手解答这段代码
//引入容器和异步控制中间件 var Container = require(‘lazy-dependable’).Container, Q = require(‘q’); //Meancore function Meancore() { Container.call(this); if (this.active) return; Meancore.Singleton = this; this.version = require(‘…/package’).version; //没有看明白 this.instanceWaitersQ = []; var defer; while(Meancore.instanceWaiters.length){ defer = Q.defer(); Meancore.instanceWaiters.shift()(this,defer); this.instanceWaitersQ.push(defer.promise); } }
3 回复