EsAsyncTaskScheduler
Description
The async task scheduler schedules the asynchronous tasks for the constructs such as futures.
It is required to do so in such a way that it can be guaranteed that the caller scheduling the tasks can complete their work before the task begins executing.
The importance of this can be seen with futures. If the future were already executing (and perhaps finished) before the caller finished subscribing all catch: handlers, then its possible they would be missed and go unhandled..even though the caller was setting them up.
A default task scheduler is registered on startup, though one could switch this out. It can be accessed by calling EsAsyncTaskScheduler class>>default
Most users should use the class-side #scheduleAt: api which takes asynchronous zones into account.
CLASS STATE
  • Default: `<EsAsyncTaskScheduler> default scheduler
Class Methods
<details> default
<pre><code> Answer the default task schedule for async operations.
Note: This accessor is primarily intended for internal use and most
users should go through the #scheduleTask: api on the class side which
takes `zones` into account.

Answers:
<EsAsyncTaskScheduler>
</code></pre> </details>
<details> new
<pre><code> Answer a new task scheduler instance.
Answers:
<EsAsyncTaskScheduler>
</code></pre> </details>
<details> scheduleTask:
<pre><code> Evaluates @aBlock asynchronously within a zone.
Arguments:
aBlock - <Block> async task to perform
Raises:
<EsAsyncScheduleTaskException>
</code></pre> </details>
Instance Methods
<details> scheduleTask:
<pre><code> Schedule @aBlock to run async in a coordinated fashion with other scheduled tasks. Tasks should be executed in the order in which they are submitted. A <EsAsyncScheduleTaskException> should be raised if the task could not be scheduled.
Arguments:
aBlock - <Block> async task to perform
Raises:
<EsAsyncScheduleTaskException>
</code></pre> </details>
<details> scheduleTask:at:
<pre><code> Schedule @aBlock to run async at @taskPriority in a coordinated fashion with other scheduled tasks. Tasks should be executed in the order in which they are submitted. A <EsAsyncScheduleTaskException> should be raised if the task could not be scheduled or the @taskPriority is invalid.
Arguments:
aBlock - <Block> async task to perform
taskPriority - <Integer> priority to run the task at
Raises:
<EsAsyncScheduleTaskException>
</code></pre> </details>
Last modified date: 04/21/2022