Table of Contents

Submit Method

Submit(Payload, Func<Payload, ValueTask>, bool)

public void Submit(FiberScheduler.Payload payload, Func<FiberScheduler.Payload, ValueTask> factory, bool batchSubmission = false)

Schedules a new task to be executed by the scheduler.

Parameters

payload FiberScheduler.Payload

The payload to be processed by the task.

factory Func<FiberScheduler.Payload, ValueTask>

A function that creates the task to be executed.

batchSubmission bool

A boolean indicating whether the submission is part of a batch. If true, the task will be enqueued but may not immediately consumed. Call CompleteBatchSubmission() to ensure consuming tasks submitted in a batch.