visionmedia/batch — pull request #20 by bjornstar (2013-12-12 14:42:46+00:00)
Title: Add a test for too many synchronous callbacks. You decide how to solve it

As I mentioned here: https://github.com/component/builder.js/pull/137

Batch has problems when too many synchronous functions are queued up. You cannot catch callstack size exceeded errors and do a callback, your stack is full and so _it will silently fail_ and your callback will not be called.

I don't know how you want to solve this issue, but it's rather nasty and I wasted quite a few hours trying to figure out what the heck was going on.

I can only offer up this test and pray for the poor souls who try to use this library with synchronous functions.