async
Async Scheduler
Description
Schedule task as if you used setTimeout(task, duration)
async
scheduler schedules tasks asynchronously, by putting them on the JavaScript
event loop queue. It is best used to delay tasks in time or to schedule tasks repeating
in intervals.
If you just want to "defer" task, that is to perform it right after currently
executing synchronous code ends (commonly achieved by setTimeout(deferredTask, 0)
),
better choice will be the asap
scheduler.
Examples
Use async scheduler to delay task
Use async scheduler to repeat task in intervals