Class: Worker

Worker(initial)

new Worker(initial)

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.
Parameters:
Name Type Description
initial Object Configuration object
Source:

Methods

compute(input) → {String}

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