I think I must be missing something, because this looks to me like a less-elegant reinvention of the functionality of a handful of already extant promise libraries. A library like 'when' already does all of this, and is much more composable. As an obvious example, there is no reason to clutter up your interfaces with specialized things like timeout parameters when a timeout something you can transparently wrap on any promise without changing its interface one bit.
People keep comparing this to Bluebird, which is great and all, but Bluebird's JS is 72KB minified, whereas this library is just 3KB.<p>That's what makes this a "small" JavaScript library for managing asynchronicity. And when you're using it for things like choosing which ads to display, etc (like some of the examples) you really don't want your JS load overhead to be very high.
Looking at the commit log [1], this code started in May 2013. That might explain why you might be thinking - why not async|bluebird|Promises? It looks like bluebird didn't start until Sept 2013 [2].<p>[1] <a href="https://github.com/douglascrockford/RQ/commits/master" rel="nofollow">https://github.com/douglascrockford/RQ/commits/master</a>
[2] <a href="https://github.com/petkaantonov/bluebird/commits/master?page=42" rel="nofollow">https://github.com/petkaantonov/bluebird/commits/master?page...</a>
Looks interesting but some direct comparisons to es6 promises would really help.<p>Favourite function description quote:
"RQ.parallel does not add parallelism to JavaScript. It allows JavaScript programs to effectively exploit the inherent parallelism of the universe."<p>Favourite variable name: untilliseconds
Must be frustrating for Crockford to be in TC39.<p>He didn't like class keyword, thought typing (TypeScript etc) is a wrong direction. This (albeit it began 2013, but it was just updated) library does not mention ES6 Promises, proposal for async await, or the yield hack.
There is also <a href="https://github.com/mbostock/queue" rel="nofollow">https://github.com/mbostock/queue</a>
415 bytes minified and gzipped!
It is kind of nasty to break your code into basic blocks, and tie them using library functions. This will certainly not make things much cleaner!<p>I was hoping one day Javascript could support "deep" coroutines, so we can keep on programming "sequentially" as we did before while still using asynchronous mechanisms.<p>Perhaps there exist languages that compile to Javascript, that offer deep coroutines (?)
I'm not sure I'll start using RQ all the time over Promises, but this does offer two nice features that Promises don't: optionals and timeouts. Optionals could easily be implemented as some like Promise.some(), while Promise.[all|some|race]() could all start taking an optional timeout parameter.