Created
November 24, 2010 23:50
-
-
Save itissid/714652 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
consumer = module.exports = function() { | |
this.q = []; | |
this.pr = []; | |
var self = this; | |
this.getQ = function(){ | |
return this.q; | |
}; | |
this.on('consume', function(){ | |
var arr_t = self.q.pop(); | |
}); | |
this.on('add', function(url, docstring){ | |
self.q.push([url, docstring]); | |
}); | |
}; | |
util.inherits(consumer, EventEmitter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment