示例#1
0
        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;
        }
示例#2
0
 public async Task CallOtherLongRunningTask(ILongRunningTaskGrain <T> target, GrainCancellationToken tc, TimeSpan delay)
 {
     await target.LongWait(tc, delay);
 }