Description
One of my applications started hanging after upgrading to 2.9.14 (on node v0.12.0). I've narrowed the issue to the change from setImmediate to nextTick.
Example
This is the simplest example I could come up with that reliably demonstrates the problem:
- git clone https://github.com/ben-page/bluebird-issue.git
- cd bluebird-issue
- npm install
- node index.js
If you run the code as is, it will hang. If you uncomment line 7 (to change the scheduler to setImmediate) or install bluebird 2.9.13, it will complete as expected.
Background
Honestly, I don't fully understand the problem, but I have found found several discussions that may be helpful. Apparently there are issues with race conditions or IO starvation related to nextTick.
nodejs/node-v0.x-archive#7996
http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/
nodejs/node-v0.x-archive#3335
https://groups.google.com/forum/#!topic/nodejs-dev/DvENgK8Nubw
Description
One of my applications started hanging after upgrading to 2.9.14 (on node v0.12.0). I've narrowed the issue to the change from setImmediate to nextTick.
Example
This is the simplest example I could come up with that reliably demonstrates the problem:
If you run the code as is, it will hang. If you uncomment line 7 (to change the scheduler to setImmediate) or install bluebird 2.9.13, it will complete as expected.
Background
Honestly, I don't fully understand the problem, but I have found found several discussions that may be helpful. Apparently there are issues with race conditions or IO starvation related to nextTick.
nodejs/node-v0.x-archive#7996
http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/
nodejs/node-v0.x-archive#3335
https://groups.google.com/forum/#!topic/nodejs-dev/DvENgK8Nubw