Skip to main content

MainThreadJobHandler.InternalEntry

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

A queued job in MainThreadJobHandler: the function that makes the steps, its running enumerator and the task that completes when it finishes.

Constructors​

MemberWhat it is
InternalEntry()Creates a MainThreadJobHandler.InternalEntry with default values.

Fields​

MemberWhat it is
CancellationToken cancellationTokenChecked before the job starts; a cancelled job completes with false.
TaskCompletionSource<bool> completionSourceCompletes when the job finishes or is cancelled.
Func<IEnumerable> getTaskFunction returning the job's steps.
uint indexRunning job number.
IEnumerator taskThe job's enumerator, stepped each frame within the time allowance.

Methods​

MemberWhat it is
override TaskAwaiter<bool> GetAwaiter()Lets callers await the entry; the result is false if it was cancelled.
void Initialize(uint index, Func<IEnumerable> getTask, CancellationToken cancellationToken = null)Resets the entry for a new job.

Used in​

Members of other types that take, return or hold a InternalEntry: