public async Task CallOtherLongRunningTaskWithLocalToken(ILongRunningTaskGrain <T> target, TimeSpan delay, TimeSpan delayBeforeCancel) { var tcs = new GrainCancellationTokenSource(); var task = target.LongWait(tcs.Token, delay); await Task.Delay(delayBeforeCancel); await tcs.Cancel(); await task; }
public async Task CallOtherLongRunningTask(ILongRunningTaskGrain <T> target, GrainCancellationToken tc, TimeSpan delay) { await target.LongWait(tc, delay); }