Table of Contents

Method ScheduleAsync

Namespace
Millrace
Assembly
Millrace.dll

ScheduleAsync<T>(Expression<Func<T, Task>>, TimeSpan, EnqueueOptions?, CancellationToken)

Runs after delay.

public ValueTask<JobId> ScheduleAsync<T>(Expression<Func<T, Task>> call, TimeSpan delay, EnqueueOptions? options = null, CancellationToken ct = default) where T : class

Parameters

call Expression<Func<T, Task>>
delay TimeSpan
options EnqueueOptions
ct CancellationToken

Returns

ValueTask<JobId>

Type Parameters

T

Exceptions

ArgumentOutOfRangeException

delay is negative. A past due time is expressed with the DateTimeOffset overload, where it is unambiguous; a negative delay is far more likely to be a subtraction that went the wrong way.

ScheduleAsync<T>(Expression<Func<T, Task>>, DateTimeOffset, EnqueueOptions?, CancellationToken)

Runs at at (UTC).

public ValueTask<JobId> ScheduleAsync<T>(Expression<Func<T, Task>> call, DateTimeOffset at, EnqueueOptions? options = null, CancellationToken ct = default) where T : class

Parameters

call Expression<Func<T, Task>>
at DateTimeOffset
options EnqueueOptions
ct CancellationToken

Returns

ValueTask<JobId>

Type Parameters

T