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 on thread termination #1104

Open
shirok opened this issue Jan 21, 2025 · 0 comments
Open

Cleanup on thread termination #1104

shirok opened this issue Jan 21, 2025 · 0 comments

Comments

@shirok
Copy link
Owner

shirok commented Jan 21, 2025

As we use threads more for transient concurrency, we need to use thread-terminate! more often and it is more likely that we hit its fundamental shortcoming---the thread being terminated can't have a chance to do any cleanup.

It will be nice that at least we try to run some sort of cleanup thunks, including rewinding dynamic handlers. thread-terminate! is defined ot kill the thread without any unwinding, so we can add more graceful termination API. One thing is that dynamic handlers can invoke previously captured continuations that prevents the thread from finishing the thread thunk. We need a way to prevent that.

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

No branches or pull requests

1 participant