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

Ensure OnStart/OnStop hooks can only be called once #931

Merged
merged 3 commits into from
Aug 24, 2022

Commits on Aug 23, 2022

  1. Ensure OnStop hooks can only be called once

    It is possible for a user to erroneously call app.Run() then
    follow up by calling app.Stop(). In such a case, it is possible
    for the app.Stop() method to be called by two goroutines concurrently,
    resulting in a race.
    
    This adds a state in the App to keep track of whether Stop() has been
    invoked so that such a race can be prevented.
    
    Fix uber-go#930
    Internal Ref: GO-1606
    sywhang committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    8c40d4e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9328eab View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2022

  1. Apply suggestions from code review

    Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
    sywhang and abhinav committed Aug 24, 2022
    Configuration menu
    Copy the full SHA
    1ab9c45 View commit details
    Browse the repository at this point in the history