Skip to content

Add Operation subclass that works with Promise #58

@lilyball

Description

@lilyball

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions