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

Cleanup ThreadPool with atexit rather than __del__ #1073

Merged
merged 2 commits into from
Feb 10, 2020

Commits on Feb 6, 2020

  1. Cleanup ThreadPool with atexit rather than __del__

    This removes the __del__ function from the generated Python client,
    and replaces it with a cleanup function. When a ThreadPool is created,
    the cleanup function is registered with the atexit module.
    
    This PR also allows the client to be used as a context manager, which
    will automatically clean up after itself rather than having to wait til
    process exit.
    
    This fixes issue kubernetes-client#1037, where the API client could hang indefinitely at
    garbage collection.
    fabianvf committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    18d21df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    13dffb8 View commit details
    Browse the repository at this point in the history