WorkerProxy
Classes
Functions
- trySendMessage(worker, message) ⇒
boolean
WorkerProxy
Kind: global class
- WorkerProxy
- new WorkerProxy(url, methods)
- .$submitRequest(name, args) ⇒
Promise.<T>
- .cancelRequest(id, method_name) ⇒
boolean
new WorkerProxy(url, methods)
Param | Type |
---|---|
url | string |
methods | Object |
workerProxy.$submitRequest(name, args) ⇒ Promise.<T>
Invoke a given method on the worker, as defined by the WorkerBuilder
Kind: instance method of WorkerProxy
Returns: Promise.<T>
- eventual result of the invoked method
Param | Type | Description |
---|---|---|
name | string | Method's name |
args | Array |
workerProxy.cancelRequest(id, method_name) ⇒ boolean
Kind: instance method of WorkerProxy
Param | Type |
---|---|
id | number |
method_name | string |
trySendMessage(worker, message) ⇒ boolean
Kind: global function
Returns: boolean
- true if sending was successful, false otherwise
Param | Type |
---|---|
worker | Worker |
message | * |