d3/d3-queue

Support for promises.

mbostock opened this issue · 1 comments

You could implement a queue that takes promises rather than callbacks. And likewise you could make the queue itself a promise, rather than exposing queue.awaitAll. (As a promise, you’re limited to getting an array of results as the value rather than returning multiple values.)

You probably don’t need both callbacks and promises in the same queue… If you’re using promises, you could always promisify / denodeify your callbacks to wrap them in promises.

No immediate plans to support this, though I’ll leave the promise branch around.