How do I write a method that limits Q promise concurrency?
For instance, I have a method spawnProcess. It returns a Q promise. I want no more than 5
spawnProcess
The Deferred promise implementation has gate function which works exactly that way:
spawnProcess = deferred.gate(spawnProcess, 5);