-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Asynchronous callbacks are not called on REPL #9310
Comments
I can't reproduce your problem. If you're referring to the |
I was lack of detail explanation. 'called' is not displayed until I press the space key. From my test, it does not have any problem on Ubuntu. |
I examined deeper. It occurs from v0.11.12, exactly from https://github.com/joyent/node/commits/e92d35d80be6e193cb547e94c6fbf3654542dbaa (uv: Upgrade to v0.11.22) |
It seems the bug is created by libuv/libuv@b197515 . |
Unable to recreate the problem on Mac OSX 10.10 running v0.12.0. Output:
'called' is printed after 5 seconds as expected. |
@jasnell I was able to recreate the |
Yep.. ok thank you @cjihrig. Seeing it now. Quite inconsistent... just did a longer test and for every three to five successful runs I'm seeing one failure. I previously just hadn't iterated the test enough times. |
I'm seeing this problem as well after I upgraded from Node v0.10.x to v0.12.1 (and yes, I'm using OS X). The command-line version of my x86 emulator starts a REPL to interact with the emulator's debugger. When I issue a "g" (go) command, the emulator -- which simulates a fixed processor speed (eg, 4.77Mhz) using setTimeout() -- runs very slowly and unevenly. Pressing keys at the REPL prompt triggers bursts of activity. It's pretty clear that the setTimeout() callbacks are not being called consistently. This was not a problem in Node v0.10.x. |
@jeffpar can you test on v0.12.2 and see if you're still seeing the issue? |
Yes, still seeing the problem in 0.12.2. Sample output:
Before issuing the "g" (go) command, I first turned all emulator messages ("m all on"), which should produce a steady stream of messages once the emulator is running. Instead, all I see is one message, and then I press "r", and another message appears, and so on. |
This code shows the problem more clearly.
|
Fixes: nodejs/node-v0.x-archive#9310 PR-URL: #1889 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Fixed by #25475. |
I just downloaded Node.js 0.12.0, and I found setTimeout's callback does not called on REPL.
But after 5 seconds or more, 'called' is printed if I press any key.
Similarly, fs.readFile does not end if I do not have any action.
Am I doing something wrong? Or is this a bug?
I am on MacOSX 10.10.2, and I installed Node.js via Homebrew.
The text was updated successfully, but these errors were encountered: