Skip to main content

WorkerProxy

Classes

WorkerProxy

Functions

trySendMessage(worker, message)boolean

WorkerProxy

Kind: global class

new WorkerProxy(url, methods)

ParamType
urlstring
methodsObject

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

ParamTypeDescription
namestringMethod's name
argsArray

workerProxy.cancelRequest(id, method_name) ⇒ boolean

Kind: instance method of WorkerProxy

ParamType
idnumber
method_namestring

trySendMessage(worker, message) ⇒ boolean

Kind: global function
Returns: boolean - true if sending was successful, false otherwise

ParamType
workerWorker
message*