Class Index | File Index

Classes


Class WorkerPool

Coordinates a group of WebWorkers.
Defined in: benchgl.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
WorkerPool(filename, n)
Creates a new WorkerPool.
Method Summary
Method Attributes Method Name and Description
 
Cleans the configurations previously assigned to workers in this WorkerGroup.
 
map(mapper)
Maps configurations to the workers in this WorkerPool.
 
reduce(reducer, callback, base)
Starts and merges the computation of the workers in this WorkerGroup.
 
Shuts down all the workers in this WorkerGroup.
Class Detail
WorkerPool(filename, n)
Creates a new WorkerPool.
Parameters:
{String} filename
The filename for the worker script.
{Number} n
The number of WebWorkers to create.
Method Detail
clean()
Cleans the configurations previously assigned to workers in this WorkerGroup.

map(mapper)
Maps configurations to the workers in this WorkerPool.
Parameters:
{Function} mapper
The mapping function.

reduce(reducer, callback, base)
Starts and merges the computation of the workers in this WorkerGroup.
Parameters:
{Function} reducer
The function to merge the results.
{Function} callback
A callback function to call when te work is done.
{Object} base
A base result to start the computation from.

shutDown()
Shuts down all the workers in this WorkerGroup.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu May 19 2011 00:47:49 GMT+0200 (CEST)