Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
bluebird 2.9.14 hangs #534
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.
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.
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.
@benjamingr That's what I'm currently doing.
I'm not trying to say that bluebird shouldn't use nextTick, just that I've found an issue with its current usage. I don't understand the bluebird internals well enough to say whether the issue can be fixed in bluebird or if its fundamental to nextTick.