electrikmilk / multi-js

Run functions on the worker side in JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multi-js

Run a function on the web worker side. This comes with limited access to the window object and no access to the DOM, but will run in the worker thread.

// Complex example:
new Thread(() => {
    // do stuff...
}, () => {
  // error callback...
}, 'background'); // priority (web worker scheduler API)

// It can be this simple:
new Thread(myFunction)

About

Run functions on the worker side in JavaScript.

License:MIT License


Languages

Language:JavaScript 100.0%