Created
March 22, 2012 20:07
-
-
Save coolaj86/2163032 to your computer and use it in GitHub Desktop.
Node Loses events on ARM
This file contains hidden or 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
| (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