Zikojs | Hooks | useThread
Definition
Section titled “Definition”useThread is a lightweight utility for executing pure functions in a separate thread
using the browser’s Web Worker API.
It allows you to offload heavy or blocking computations without freezing the UI.
Signature
Section titled “Signature” useThread( fn : Function, callback : (result, error) : void args? : any[], close? : boolean ) : UseThreadMethods
Section titled “Methods”📦 .call() : this📦 .terminate() : this