cho45 / jsdeferred

Asynchronous library in JavaScript. Standalone and Compact.
http://cho45.stfuawsc.com/jsdeferred/
332 stars 48 forks source link

Add throtteling to parallel function execution #9

Open fbuchinger opened 13 years ago

fbuchinger commented 13 years ago

underscore.js has a quite useful _.throttle function that prevents too frequent function invocation. http://documentcloud.github.com/underscore/#throttle

This could also be a useful parameter for jsdeferred's parallel function (only execute a maximum of n parallel functions concurrently - queue the execution of the rest meanwhile)

cho45 commented 13 years ago

I agree that _.throttle is useful.

But I can't image an use case of the parameter in parallel function.