Closed madarche closed 11 years ago
Actually I think I'm wrong: deferred.gate
limits the concurrency of promises based on the fact that they are resolved or not. So any chaining will be handled by deferred.gate
.
But I'm having problems with my usage of deferred.gate
that doesn't totally protect my application from opening too many files.
deferred.gate
provides function wrapper for function that returns promise. It doesn't do anything to promise objects, it just limits creation of them by blocking calls to function it wraps.
Can you show me a snippet of your code, one you have problems with?
Thank you!
Hello,
When reading the code of
deferred.gate
it seems to me thatdeferred.gate
only limits the concurrency of the "first" promise calls it has as a param. If so, it means that when there are chained promises, the later ones will not have their concurrency limited.Whether I'm right or not, clarifying this point in the doc would undoubtedly be useful.
Thanks!