-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
base: master
Are you sure you want to change the base?
Conversation
for (final ShutdownHook shutdownHook in registeredHooks) { | ||
try { | ||
final Future<void> future = asyncGuard<void>( | ||
() async => shutdownHook(), |
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.
Can this just be shutdownHook
since ShutdownHook
is just FutureOr<void> Function()
?
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.
No, because asyncGuard requires Future<T>
and shutdownHook
is FutureOr<>
.
autosubmit label was removed for flutter/flutter/171917, because - The status or check suite Linux analyzer_benchmark has failed. Please fix the issues identified (or deflake) before re-applying this label. |
autosubmit label was removed for flutter/flutter/171917, because - The status or check suite Linux tool_integration_tests_1_7 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Closes #57351.