Worker implementation. All defined workers MUST be terminated until application shut down. In opposite case you can get AV.
# new Worker (paramsObj: Object)
Members
# name instance
Name | Type | Description |
---|---|---|
name | string | Worker name |
# workerID instance
Name | Type | Description |
---|---|---|
workerID | Number | Worker ID |
Methods
# getMessage () → * instance
Get message from the worker thread
# postMessage (message: *) instance
Post message to worker thread. Message are stringified before send
Arguments:
message
: *
# terminate () instance
Terminate worker thread
# waitMessage (timeout: Number, checkEveryMSopt: Number) → * instance
Try get message from worker thread. Wait until message received or timeout expired