new threadManager(name, location)
Main class for managing threads. Results and execution time are saved here
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the thread manager. |
location |
string | The location of the worker script file. |
Properties:
Name | Type | Description |
---|---|---|
engine |
name of the engine |
|
workerLocation |
location of the worker running the engine |
|
workerThreads |
holder for all the worker threads |
|
maxWorkerCount |
maximum workers on the browser Leave it at least 1 less than all the available. |
|
results |
holder of the results once finished |
- Source:
Members
(static) execTimes
Retrives all the execution times of a worker thread. It is triggered within the engine class.
- Source:
Methods
(static) createWorkerThread(number)
Holder for the workers created by the class. It creates an object that contains the workers defined by the execution context holding the execution time of each thread and the worker itself.
Parameters:
Name | Type | Description |
---|---|---|
number |
Number | number of thread to run |
- Source:
(static) initializeWorkerThread(index)
Method initializer of the threads found in the workerThread object. It attaches each of the properties into the object.
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | number of the thread. |
- Source:
(static) resetWorkers()
Resets all the workers set to work in the compute engine.
- Source: