Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

RunActionAsync and RunActionsAsync does not accept CancellationToken #410

Open
Crisfole opened this issue Jan 27, 2017 · 0 comments
Open

Comments

@Crisfole
Copy link

Currently there is no way to cancel a running Action. Suppose we did this:

public async Task SlideUp(CancellationToken ct) {
  var state = await RunActionAsync(new CCMoveBy(2f, new CCPoint(0, 100)));
}

You can't get the state so you can't call StopAction in a cancellation token Register call.

It'd be nice to either allow passing in a token:

RunActionAsync(action, token)

Or (ick, but easy) pass the ActionState back as an out parameter so we can manually Register what we want to happen.

Make sense? Need a better example?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant