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

feat: tea.Wait #722

Merged
merged 3 commits into from May 4, 2023
Merged

feat: tea.Wait #722

merged 3 commits into from May 4, 2023

Conversation

caarlos0
Copy link
Member

wait for the underlying context to finish.

extract from #352

wait for the underlying context to finish.

extract from #352
@caarlos0 caarlos0 self-assigned this Apr 17, 2023
@caarlos0 caarlos0 added the enhancement New feature or request label Apr 17, 2023
@caarlos0 caarlos0 marked this pull request as ready for review April 17, 2023 14:46
Copy link
Member

@meowgorithm meowgorithm left a comment

Choose a reason for hiding this comment

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

Per my chat with @muesli, it would be awesome if Wait() could return after the terminal state has been restored (internally, at the end of Program.shutdown).

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0
Copy link
Member Author

ah, I actually don't even need this, I can pass my own context with WithContext.

as per your request, pushed something I think will help

Copy link
Member

@meowgorithm meowgorithm left a comment

Choose a reason for hiding this comment

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

Nice! This is exactly how I solved for it in #726 — except your API design's much better.

@caarlos0 caarlos0 merged commit 9cc3861 into master May 4, 2023
18 checks passed
@caarlos0 caarlos0 deleted the wait branch May 4, 2023 19:30
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

Successfully merging this pull request may close these issues.

None yet

3 participants