Skip to content
New issue

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

AsyncDelegateCommand enhancements #2993

Merged
merged 9 commits into from
Nov 14, 2023
Merged

Conversation

dansiegel
Copy link
Member

Description of Change

Adds various minor fixes for AsyncDelegateCommand

  • Adds new CancelAfter(TimeSpan) method to set the CancelationToken Factory to provide a Token that will expire after a specified TimeSpan
  • Adds additional check in the Execute to ensure if Parallel Execution is disabled that we do not execute while IsExecuting is true. This will automatically cancel the additional request.
  • Sets ConfigureAwait on the Delegate to false as the Command should not need to return to the calling thread.
  • Uses WaitAsync(CancelationToken) when running in net6+ for delegates that do not directly provide a CancelationToken

@dansiegel dansiegel force-pushed the dev/ds/asynccommand-enhancements branch from 5c91188 to 56e4d88 Compare November 14, 2023 00:25
@dansiegel dansiegel merged commit b5c5f72 into master Nov 14, 2023
2 of 6 checks passed
@brianlagunas brianlagunas deleted the dev/ds/asynccommand-enhancements branch November 14, 2023 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants