github andywer/threads.js v1.0.0

latest releases: v1.7.0, v1.6.5, v1.6.4...
4 years ago

Finally, after about half a year in beta here it is – threads.js v1.0 🚀🎉

It has not been easy, but it's been worth the effort. Thanks to everyone who contributed to the v1.0 release! There were and still are many different ways to contribute.

Changes since v0.12

Version 1.0 is a complete rewrite of the library with a new API and written in TypeScript. It is the result of all the lessons learned from working on and working with v0.x.

The most noticeable changes are:

  • New functional Promise- & Observable-based API
  • Transparent calls to worker code
  • First-class TypeScript support
  • First-class webpack support via threads-plugin

This also means that you can now write worker code pretty intuitively and use worker functions just by calling them like any other function.

Since the new API is Promise-based, error handling now finally feels trivial. You might notice there is no more UMD build. If you feel like this is an issue you can vote to add it again in #191.

Changes since v1.0.0-beta.9

  • Fix Transfer() function signature (#190)
  • Add maxQueuedJobs option to pool (#188)
  • Consistenly using observable-fns now (#185)
  • Small performance improvements (#189)
  • Some code refactorings (#186)

Future

A couple of features are still in discussion – head over to Issues to check them out. Here is a brief summary.

  • Allow passing callbacks to workers (#145)
  • IE11 support (#171)
  • Easy worker-to-worker communication (#169)
  • Turn functions into workers (no extra worker file)
  • Custom serializers/deserializers for data passed to/from workers

If you have any feedback you would like to share, feel free to open an issue or ping @andywer via gitter.im / twitter.com.

You can also help this project. Engage in discussions, contribute code, improve the documentation, become a sponsor or just simply star the repository and spread the word.

Happy hacking!

Don't miss a new threads.js release

NewReleases is sending notifications on new releases.