• 1Installation
  • 2Preliminary Knowledge
  • 3Async Executor
  • 4Then/Catch/Finally
  • 5Error Recovery
  • 6Chaining

Async.apex

  • Docs
  • Tutorials
Getting started with Async.apex

Chaining

Funcs in then/error/done are executed synchronously. Only Async.Executor instances are executed asynchronously. That means that if we want to make a piece of code asynchronous, we will have to wrap it in Async.

promise.then(new SyncCodeFunc()) // sync code
    .then(new ReturnAsyncFunc()) // async code executed in the returning Async
    .fork();