-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Is there a way to make operations cancelable? #6
Comments
What is the expectation when an operation is cancelled?
Another consideration: what does cancelling a request mean to I'm guessing you'd want to ability to cancel a chain of requests, regardless of where in the flow you are (e.g. if you chained a concurrent map on At my company, we were using some AngularJS services sitting atop |
Sorry for taking so long to respond. I think your observations make sense. Since all fasy iterators return promises for their results, I think the most sensible thing is that canceled operations result in rejecting that promise. Still trying to consider the ergonomics of specifying the CAF-style cancelation tokens. |
Explore some way to combine/bring in CAF (cancelable async functions) capabilities so that fasy's async iterations are optionally cancelable.
This might need to be a separate namespace where the API methods assume the cancelable token being passed in, or it may just be that existing methods could be polymorphic in some way.
Also to be explored: should fasy re-implement the cancelation, or should there be an adapter that can be optionally applied which delegates to CAF (which would need to be present separately) when needed.
The text was updated successfully, but these errors were encountered: