Interface IJobInfo

Provides a control mechanism that allows a job to cooperatively yield. This object is passed to your work function when you schedule it.

Index

Properties

Methods

Properties

public job: IJob

Gets the work item associated with this IJobInfo.

public shouldYield: boolean

Gets a value that specifies whether the job should yield.

Methods

public setPromise(promise: Promise)

Uses a Promise to determine how long the scheduler should wait before rescheduling the job after it yields.

Parameters

  • promise: Promise

    Once the work item yields, the scheduler will wait for this Promise to complete before rescheduling the job.

public setWork(work: Function)

Specifies the next unit of work to run once this job yields.

Parameters

  • work: Function

    The next unit of work to run once this job yields.