andywer/threadpool-js — pull request #3 by devongovett (2014-11-25 21:29:57+00:00)
Title: commonjs/browserify support and a few improvements

This adds a commonjs export for tools like [browserify](http://browserify.org/). It also fixes the worker check in Safari, in which `typeof Worker === 'object'` not `function`. The last thing it does is unshift the idle threads instead of push them. This means that less workers will be spun up potentially since workers that have just been used will be reused. I found that this can speed things up if there are not many parallel jobs running - there is a cost to starting new workers.

P.S. if you'd like to release this on npm, that would be awesome! Thanks for a great library. :smile: