caolan/async — pull request #558 by amv (2014-06-17 21:49:25+00:00)
Title: Defense for eached array alteration, fixes #557

Altering the array of iterables after calling each on the array makes async either call the callback several times or not call the callback at all (depending on wether you add or remove array items).

Although it is probably not a very good practise to alter the array while it is being iterated with each, sometimes the array is passed on and the person receiving the array does not know that such requirement is in place.

The current async behaviour in such situations is very problematic and this commit should fix the problems. This should fix #557 .