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

Fix worker proc hanging at exception #172

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Conversation

albertz
Copy link
Member

@albertz albertz commented Jan 10, 2024

Not all exceptions in Task.run will lead to logging_thread.stop(), which is required that the proc does not hang at exit, because logging_thread was not a daemon thread.

We make it a daemon thread now.
And also, we additionally make extra sure that logging_thread.stop() is called.
(Although there are maybe still other rare cases where this is not effective, so the daemon thread property is still important as well.)

Fix #171.

Not all exceptions in Task.run will lead to logging_thread.stop(),
which is required that the proc does not hang at exit,
because logging_thread was not a daemon thread.

We make it a daemon thread now.
And also, we additionally make extra sure that logging_thread.stop()
is called.
(Although there are maybe still other rare cases where this is not effective,
so the daemon thread property is still important as well.)

Fix #171.
@albertz albertz merged commit 5556b5b into master Jan 10, 2024
3 checks passed
@albertz albertz deleted the albert-fix-worker-hang-171 branch January 10, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local job hangs, not available input
2 participants