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

Reap workers in the main loop #2314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Reap workers in the main loop #2314

wants to merge 1 commit into from

Commits on Dec 27, 2023

  1. Reap workers in the main loop

    Handle SIGCHLD like every other signal, waking up the arbiter and
    handling the signal in the main loop rather than in the signal handler.
    Take special care to reinstall the signal handler since Python may not.
    
    Clean up workers and call the worker_exit hook in only one place. When
    killing a worker, do not clean it up. The arbiter will now clean up the
    worker and invoke the hook when it reaps the worker.
    
    Ensure that all workers have their temporary watchdog files closed and
    that the arbiter does not exit or log about other child processes dying.
    
    With reaping handled in the main loop and kill_worker delegating
    responsibility for cleanup to the reaping loop, iterate over the workers
    dictionary everywhere else without concern for concurrent modification.
    tilgovi committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    a526c00 View commit details
    Browse the repository at this point in the history