Skip to content

Commit 344de52

Browse files
author
Jos Hickson
committed
Cancelling the schedule wasn't always cancelling the returned task.
1 parent ddd650a commit 344de52

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Winton.Extensions.Threading.Actor/Internal/ActorWorkScheduler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ private async Task Schedule(Func<Task> enqueuer, TimeSpan interval, ActorSchedul
8282
await GetDelay(interval, cancellationToken).ConfigureAwait(false);
8383
await enqueuer().ConfigureAwait(false);
8484
}
85+
86+
cancellationToken.ThrowIfCancellationRequested();
8587
}
8688

8789
private Task GetDelay(TimeSpan interval, CancellationToken cancellationToken)

0 commit comments

Comments
 (0)