Skip to main content

Class: ThreadPool

(abstract)ThreadPool(messenger)

Workers consumer

Constructor

(abstract) new ThreadPool(messenger)

Parameters:
NameTypeDescription
messengerwasm.ThreadMessenger
Properties:
NameTypeDescription
statusCommon.ThreadPool.StatusWorker status

Methods

(async) broadcast()

Bulk execution of action to all workers

close()

Terminate all underlying workers

(async) open()

Generate n workers based on CPU cores. Invokes worker INIT action.

(abstract) updateProgress(value, expected)

Reports build progress

Parameters:
NameTypeDescription
valuefloatPercent of processed tasks
expectedintCount of tasks that are not processed yet

Home