Async.apex

  • Docs
  • Tutorials
Docs Menu
  • Async
  • Methods
  • Executor

Methods Guide

Async Methods

How to Create an Async?

Below are all the ways to create an Async.

MethodDescription
new Async(Async.Executor)Create an Async with an Async.Executor
new Async(Func)Create an Async with a Func
Async.resolve(Object)Create a resolved Async returning the value
Async.reject(Object)Create a rejected Async returning the error

How to Query an Async?

MethodDescription
isPending()Check if the Async is pending
isResolved()Check if the Async is fulfilled
isRejected()check if the Async is rejected

How to Chain an Async?

MethodDescription
then(Func, Func)Add the success handler and the error handler
then(Func)Add the success handler
error(Func)Add the error handler
done(Func)Add the handler as the success handler and error handler
fork()Trigger the Async to execute

Contribute on Github! Edit this section.