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

✨ Allow terminal defer #79

Closed
wants to merge 2 commits into from
Closed

✨ Allow terminal defer #79

wants to merge 2 commits into from

Conversation

nlepage
Copy link
Member

@nlepage nlepage commented Nov 10, 2021

Useful for resource management

@nlepage nlepage self-assigned this Nov 10, 2021
yield terminal(defer(function* cleanupResource() {
actions.push(`cleanup resource ${id}`)
}))
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to return something ? For a resource it could be very usefull

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I'll change the test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, actually no...

packages/core/src/stack.ts Outdated Show resolved Hide resolved
Co-authored-by: Valentin Cocaud <v.cocaud@gmail.com>
@nlepage
Copy link
Member Author

nlepage commented Nov 10, 2021

This was a bad idea

@nlepage nlepage closed this Nov 10, 2021
@nlepage nlepage deleted the enhance/terminal-defer branch November 19, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants