Class: Worker

Worker(method)

Workers are arbitrary containers for processing data. They can be thought of almost like "threads", as they run asynchronously over the duration of a contract's lifetime as "fulfillment conditions" for its closure.

Constructor

new Worker(method)

Parameters:
Name Type Description
method function Pure function.
Source:

Methods

(async) compute(input) → {String}

Handle a task.
Parameters:
Name Type Description
input Vector Input vector.
Source:
Returns:
Outcome of the requested job.
Type
String