-
Notifications
You must be signed in to change notification settings - Fork 65
refactor: add a TaskRunner class #2849
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
Conversation
Signed-off-by: Philippe Martin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
|
||
export class ApplicationManager extends Publisher<ApplicationState[]> implements Disposable { | ||
#applications: ApplicationRegistry<ApplicationState>; | ||
protectTasks: Set<string> = new Set(); | ||
#disposables: Disposable[]; | ||
#taskRunner: TaskRunner; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if task runner is stored like that it should be disposable, and be disposed if the class is disposed, cancelling any pending tasks it is managing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be a good enhancement, but as this is only a refactoring, I don't want to change any behaviour
Signed-off-by: Philippe Martin [email protected]
What does this PR do?
Add a TaskRunner class to separate task logic and implementation
Screenshot / video of UI
N/A
What issues does this PR fix or reference?
Related to #2628
How to test this PR?
Start recipes and check everything works as before