Implements the Async IO API collecting ways of properly doing asynchronous
programming within a Deno or Web Browser runtime.
- Source:
Members
(static, readonly) hardwareConcurrency :number
Identifies the number of processors to facilitate dedicated workers.
Type:
- number
- Source:
Methods
(static) sleep(params) → {Promise.<void>}
Will sleep an asynchronous task for the specified delay in
milliseconds.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
- Type
- Promise.<void>
(static) task(params) → {Promise.<any>}
Will process a one off asynchronous task on the main thread.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
The calculated result or Error object if a
failure occurred.
- Type
- Promise.<any>
(static) timer(params) → {CTimer}
Kicks off a timer to schedule tasks on the thread for which it is
created calling the task on the interval specified in milliseconds.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
The created timer.
- Type
- CTimer
(static) worker(params) → {CAsyncWorker}
Creates the CAsyncWorker dedicated FIFO worker for background work to
the client.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
The worker created from this namespace.
- Type
- CAsyncWorker