Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 688 Bytes

exposeModelWorker.md

File metadata and controls

20 lines (13 loc) · 688 Bytes

@sdeverywhere/runtime-async / exposeModelWorker

Function: exposeModelWorker

exposeModelWorker(init): void

Expose an object in the current worker thread that communicates with the ModelRunner instance running in the main thread. The exposed worker object will take care of running the model on the worker thread and sending the outputs back to the main thread.

Parameters

Name Type Description
init () => Promise<GeneratedModel> The function that initializes the generated model instance that is used in the worker thread.

Returns

void