Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 974 Bytes

File metadata and controls

45 lines (35 loc) · 974 Bytes

WWlib: Some lazy Web Workers library

  • Author: Phoenix35
  • Year: 2012
  • Released under GNU/GPL License

Feel free to copy and use at will, but please mention the author.

Usage

Instanciation

Arguments are the one normally used on calling new Worker(script_1_URI), new Worker(script_2_URI)

var workers = new ww([script_1_URI[, ...]]);

workers is the global object containing every Web Workers

Accessing a worker

workers[script_1_URI];

or

workers[worker_id];

Look at console to know which worker has which id

Methods

Adding

You may add a worker to the object simply by using the add method

workers.add(script_2_URI);

Look at the console.

Messages

Use a Web Worker as usual (no methods implemented yet)

Terminate

You can either use terminate() or kill() Look at the console for difference.