A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pikax.me/vue-composable/composable/web/workerFunction below:

Website Navigation


WebWorker Function | vue-composable

# WebWorker Function

Creates a WebWorker based on a function, useful for offloading heavy tasks easily

The useWorkerFunction function uses CancellablePromise

# Parameters Parameters Type Required Default Description fn Function true Function we want to execute in the worker options WebWorkerFunctionOptions false undefined Options for the webworker # State

The useWorkerFunction function exposes the following reactive state:

State Type Description promise Promise Current worker process result any Resolved value loading boolean Waiting for the worker to finish error any Promise error cancelled boolean Was cancelled # Methods

The useWorkerFunction function exposes the following methods:

Signature Description exec(args?) Resolves new promise cancel(error?) Terminates the worker # Example Sort

time: 1634454087218

If UI thread is working the refresh rate should go down and the time will stop

Timeout

Numbers: []... []

# Code

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4