mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-17 20:50:11 +00:00
WithCancellation
This commit is contained in:
@@ -55,7 +55,7 @@ namespace Cysharp.Threading.Tasks.Linq
|
||||
|
||||
public UniTask<bool> MoveNextAsync()
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested) return CompletedTasks.False;
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
current++;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Cysharp.Threading.Tasks.Linq
|
||||
|
||||
public UniTask<bool> MoveNextAsync()
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested) return CompletedTasks.False;
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
if (remaining-- != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user