Skip to content

Instantly share code, notes, and snippets.

@coolaj86
Created March 22, 2012 20:07
Show Gist options
  • Select an option

  • Save coolaj86/2163032 to your computer and use it in GitHub Desktop.

Select an option

Save coolaj86/2163032 to your computer and use it in GitHub Desktop.
Node Loses events on ARM
(function () {
"use strict";
var emitter = require('events').EventEmitter
, catcher = new emitter()
, count = 0
, timeout = 1000 * 1000
;
catcher.on('a', function(num) {
console.log(num);
});
while(timeout > 0) {
timeout -= 1;
setTimeout(function() {
catcher.emit('a', count);
count += 1;
}, timeout);
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment