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

Add Operation subclass that works with Promise #58

Closed
lilyball opened this issue Jul 28, 2020 · 0 comments
Closed

Add Operation subclass that works with Promise #58

lilyball opened this issue Jul 28, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@lilyball
Copy link
Owner

It would be useful to have an async Operation subclass that wraps a computation and has an associated Promise. This would make it easier to integrate promises into dependency management that Operation is good at expressing.

With this approach, the client would create an instance of the Operation subclass, and the instance would have an associated read-only promise property that returns a promise that is resolved by the operation's computation. No computation occurs until the operation starts (either by calling start() or by adding it to a queue). Requesting cancellation of the promise should call cancel() on the operation, and calling cancel() on the operation should request cancellation of the promise.

@lilyball lilyball added the enhancement New feature or request label Jul 28, 2020
lilyball added a commit that referenced this issue Aug 19, 2020
This is an `Operation` subclass that wraps a `Promise`, including
deferred execution of the handler that resolves the promise.

This is just the Swift support. The Obj-C support will come in a
separate commit.

Fixes #58.
@lilyball lilyball self-assigned this Aug 19, 2020
@lilyball lilyball added this to the Next milestone Aug 19, 2020
lilyball added a commit that referenced this issue Aug 19, 2020
This is an `Operation` subclass that wraps a `Promise`, including
deferred execution of the handler that resolves the promise.

This is just the Swift support. The Obj-C support will come in a
separate commit.

Fixes #58.
lilyball added a commit that referenced this issue Aug 20, 2020
This is an `Operation` subclass that wraps a `Promise`, including
deferred execution of the handler that resolves the promise.

This is just the Swift support. The Obj-C support will come in a
separate commit.

Fixes #58.
lilyball added a commit that referenced this issue Aug 20, 2020
This is an `Operation` subclass that wraps a `Promise`, including
deferred execution of the handler that resolves the promise.

This is just the Swift support. The Obj-C support will come in a
separate commit.

Fixes #58.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant