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

fix: complete command execution only when pipeline completes #1244

Closed
kentcb opened this Issue Jan 25, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@kentcb
Copy link
Contributor

kentcb commented Jan 25, 2017

Do you want to request a feature or report a bug?

Bug.

What is the current behavior?

A reactive command's execution completes whenever a value ticks.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Create a command that ticks multiple values:

var ticks = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1)).Take(3);
var command = ReactiveCommand.CreateFromObservable(ticks);

When you execute the command, you'll see its IsExecuting changes to false as soon as the first value is ticked rather than waiting for all 3 values to tick.

What is the expected behavior?

An execution pipeline should complete before the command becomes available again.

What is the motivation / use case for changing the behavior?

Erroneous behavior. Ticking multiple values can be useful in certain circumstances (such as reporting progress throughout execution).

Which versions of ReactiveUI, and which platform / OS are affected by this issue? Did this work in previous versions of ReativeUI? Please also test with the latest stable and snapshot (http://docs.reactiveui.net/en/contributing/snapshot/index.html) versions.

7

@kentcb kentcb self-assigned this Jan 26, 2017

@ghuntley ghuntley added this to the vNext milestone Jan 31, 2017

ghuntley added a commit that referenced this issue Jan 31, 2017

@ghuntley ghuntley removed the in progress label Jan 31, 2017

kentcb added a commit that referenced this issue Feb 20, 2017

@kentcb kentcb changed the title Command execution should end when pipeline ends fix: complete command execution only when pipeline completes Feb 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment