Detecting dead-locks in async.auto() and throwing an Error#663
Detecting dead-locks in async.auto() and throwing an Error#663aearly merged 3 commits intocaolan:masterfrom
Conversation
|
👍 Cool stuff. Now we just need to wait for @caolan .... |
|
@Mickael-van-der-Beek Can you fix the conflicts so this merges cleanly? @aearly I'm happy to merge too, caolan gave me contributor access when I asked if he needed help last month. You should ask as well (assuming you'd want it), I'm fairly sure he'd oblige given that you already seem to be doing the majority of the maintenance. :) |
|
Ok, I merged my fork's "dead-locks" branch with caoloan's upstream master branch. @beaugunderson Would it be possible to merge ? |
|
@beaugunderson If you say so I'll ask. :) Getting push access to such a widely used library is a huge responsibility, though... |
|
Is there anyway for this to be merged ? If nobody's got time and trusts me enough to give me contributor access, I could do it myself. |
|
We have to resurrect @caolan from his slumber. |
Detecting dead-locks in async.auto() and throwing an Error
This pull request adds dead-lock detection in
async.auto()due to dependencies and thus fixes #263.The three dead-lock cases that were handled and for which test cases were added are:
2.; e.g:If any of these cases are encountered, a verbose
Error()is thrown.It is possible to improve the performance a little bit further by embedding these detections inside the
ready()method because we already loop through therequiresarray during theArray.reduce()call:Mickael-van-der-Beek/async@2410077e26d5429ac45533438f008706dcb989f7/lib/async.js#L492
but I felt that it would be a dirtier solution.
If you prefer the faster solution though, just ask and I'll create a new pull-request for it.