Skip to content

Navigation Menu

Sign up
js-platformPublic

About

Web worker thread pool library

Resources

Stars

20 stars

Watchers

0 watching

Forks

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

job

Provides pooling with web workers with a simple API to make web workers less scary to use.

With job.js, you can create a pool of web workers that you can accept work and run a callback when the work finishes:

function add( a, b ) {
 console.log( 'adding ' + a + ' and ' + b );
 return a + b;
};
function go() {
 var pool = new job.Pool();
 pool.dispatch(
 add,
 [1, 2],
 function( result ) {
 console.log( result )
 }
 );
};

No need to worry about creating web workers or message passing. Notice that you can also log to the console!

Contributing

Come find me on irc.mozilla.org in #games (my name is ack). I also love to accept pull requests.

About

Web worker thread pool library

Resources

Stars

20 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /