We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When multiple async commands are running at the same time, cancellation only works for the last async command.
StartCommand
CancelCommand
public MainViewModel() { StartCommand = new AsyncCommand(StartAsync).WithCancellation(); CancelCommand = new Command(() => StartCommand.Cancel()); } public IAsyncCommand StartCommand { get; } public ICommand CancelCommand { get; } private async UniTask StartAsync(CancellationToken cancellationToken) { while (cancellationToken.IsCancellationRequested == false) { await UniTask.Delay(1000, cancellationToken: cancellationToken); Debug.Log(nameof(StartAsync)); } }
Only the last command will be canceled.
All running commands should be canceled.
The text was updated successfully, but these errors were encountered:
Fix #4
c83e20a
ChebanovDD
Successfully merging a pull request may close this issue.
Bug description
When multiple async commands are running at the same time, cancellation only works for the last async command.
Minimal reproduction code and steps
StartCommand
several timesCancelCommand
Current result
Only the last command will be canceled.
Expected result
All running commands should be canceled.
The text was updated successfully, but these errors were encountered: