Table of Contents

Method TryAdmitRunAsync

Namespace
MailFathom.Application.Retrieval.AskMail
Assembly
MailFathom.Application.dll

TryAdmitRunAsync(CancellationToken)

Takes an allowance for one run, if the current period has one left.

Task<bool> TryAdmitRunAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancels the admission.

Returns

Task<bool>

true when the run may proceed, and false when the period is spent.

Remarks

The run is counted by the act of admitting it rather than when it finishes, so a run still in flight already occupies its place: the alternative would admit every concurrent question and count them afterwards, which is precisely the burst the ceiling exists to bound.