othiym23/async-listener — pull request #21 by hayes (2014-10-23 01:35:48+00:00)
Title: Fix removeAsyncListener and remove redundant listenerStack

This is still somewhat a work in progress, but I wanted to get some feedback to make sure I am not going in the wrong direction here.

I *think* the concept of a listener stack is unnecessary, although I may be missing an edge case I am not aware of, this passes test in this repo, and the cls tests, so I am hoping its on the right track.

Basically because of the way the listener stack works, removing a listener would remove it for only the calls generated in the current tick, but if those callbacks created new asynchronous calls, they will restore the listener for that stack. This fixes that issue, but maintains the behavior where remove only affects the current async call stack