Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / performMicrotask

Variable: performMicrotask()

const performMicrotask: {(callback): void; (callback): void; }

Defined in: projects/libraries/streamix/src/lib/primitives/scheduling.ts:10

Low-level microtask scheduler used across Streamix internals.

Prefers the platform-native queueMicrotask when available and falls back to Promise.resolve().then(...) otherwise.

This is intentionally exported so other Streamix packages (and power users) can share a consistent scheduling primitive.

Call Signature

(callback): void

MDN Reference

Parameters

callback

VoidFunction

Returns

void

Call Signature

(callback): void

The queueMicrotask() method queues a microtask to invoke callback. If callback throws an exception, the process object 'uncaughtException' event will be emitted.

The microtask queue is managed by V8 and may be used in a similar manner to the process.nextTick() queue, which is managed by Node.js. The process.nextTick() queue is always processed before the microtask queue within each turn of the Node.js event loop.

Parameters

callback

() => void

Function to be queued.

Returns

void

Since

v11.0.0

Released under the MIT License.