Method TryAdmitRunAsync
- Namespace
- MailFathom.Infrastructure.Observability
- Assembly
- MailFathom.Infrastructure.dll
TryAdmitRunAsync(CancellationToken)
Takes an allowance for one run, if the current period has one left.
public Task<bool> TryAdmitRunAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenCancels the admission.
Returns
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.