Content-Length: 298233 | pFad | http://github.com/flutter/flutter/pull/171917

96 Wrap `ShutdownHook` calls to avoid crashing the tool by matanlurey · Pull Request #171917 · flutter/flutter · GitHub
Skip to content

Wrap ShutdownHook calls to avoid crashing the tool #171917

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

matanlurey
Copy link
Contributor

Closes #57351.

@matanlurey matanlurey requested a review from bkonyi July 9, 2025 21:41
@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. d: docs/ flutter/flutter/docs, for contributors labels Jul 9, 2025
@github-actions github-actions bot removed the d: docs/ flutter/flutter/docs, for contributors label Jul 9, 2025
for (final ShutdownHook shutdownHook in registeredHooks) {
try {
final Future<void> future = asyncGuard<void>(
() async => shutdownHook(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this just be shutdownHook since ShutdownHook is just FutureOr<void> Function()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shutdown hooks shouldn't crash the tool
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/flutter/flutter/pull/171917

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy