mozilla/fireplace — pull request #112 by mattbasta (2013-05-13 18:12:22+00:00)
Title: Updated requests, pool improvements

* Updated docs to reflect latest requests code
* Alphabetized methods
* Changed pool to only allow close after `.finish()` has been called

cc @muffinresearch

This should fix your race condition issues. The `this` context bug was previously preventing the pool from actually closing, which was enabling the code to continue working. Once you fix that, the bug is apparent. The pool should only close after `pool.finish()` is explicitly called, not when individual requests complete.

This may also allow us to remove some janky `setTimeout`s in other parts of the code.