Module boa_engine::job
source · Expand description
Boa’s API to create and customize ECMAScript
jobs and job queues.
NativeJob
is an ECMAScript Job, or a closure that runs an ECMAScript
computation when
there’s no other computation running.
JobCallback
is an ECMAScript JobCallback
record, containing an ECMAScript
function
that is executed when a promise is either fulfilled or rejected.
JobQueue
is a trait encompassing the required functionality for a job queue; this allows
implementing custom event loops, custom handling of Jobs or other fun things.
This trait is also accompanied by two implementors of the trait:
IdleJobQueue
, which is a queue that does nothing, and the default queue if no queue is provided. Useful for hosts that want to disable promises.SimpleJobQueue
, which is a simple FIFO queue that runs all jobs to completion, bailing on the first error encountered.
Structs§
- A job queue that does nothing.
JobCallback
records.- An ECMAScript Job closure.
- A simple FIFO job queue that bails on the first error.
Traits§
- A queue of
ECMAscript
Jobs.
Type Aliases§
- The
Future
job passed to theJobQueue::enqueue_future_job
operation.