Add concurrency control to async relay commands #1
Labels
feature request 📬
A request for new changes to improve functionality
improvements ✨
Improvements to an existing functionality
mvvm-toolkit 🧰
Issues/PRs for the MVVM Toolkit
need documentation 📃
This change needs a related documentation PR
Describe the problem this feature would solve
Right now the two async command types in the MVVM Toolkit (
AsyncRelayCommand
andAsyncRelayCommand<T>
) always allow asynchronous actions to be executed concurrently, if triggered more than once, with no easy way to just restrict only one to be executing at any given time. There should be built-in support for this that is easily configurable.Describe the solution
This is the API breakdown for the proposed change:
The default execution mode would be the same as today (when no
allowConcurrentExecutions
parameter is passed).This ensures that existing consumers won't experience a difference in behavior when upgrading to a new version.
Describe alternatives you've considered
Just letting consumers handle this manually, which is extremely clunky and not really intuitive.
The text was updated successfully, but these errors were encountered: