QuickBEAM.VM.Heap.Async (QuickBEAM v0.10.9)

Copy Markdown View Source

Process-local queues for microtasks and promise waiters.

Summary

Functions

Deletes waiter state for the promise identified by ref.

Removes and returns the next queued microtask, or nil when the queue is empty.

Adds a microtask to the process-local JavaScript microtask queue.

Returns callbacks waiting for the promise identified by ref.

Returns whether the JavaScript microtask queue is empty.

Stores callbacks waiting for the promise identified by ref.

Functions

delete_promise_waiters(ref)

Deletes waiter state for the promise identified by ref.

dequeue_microtask()

Removes and returns the next queued microtask, or nil when the queue is empty.

enqueue_microtask(task)

Adds a microtask to the process-local JavaScript microtask queue.

get_promise_waiters(ref)

Returns callbacks waiting for the promise identified by ref.

microtasks_empty?()

Returns whether the JavaScript microtask queue is empty.

put_promise_waiters(ref, waiters)

Stores callbacks waiting for the promise identified by ref.