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

thread_local does not support types that implement Drop #18228

Closed
carllerche opened this issue Oct 22, 2014 · 2 comments
Closed

thread_local does not support types that implement Drop #18228

carllerche opened this issue Oct 22, 2014 · 2 comments

Comments

@carllerche
Copy link
Member

I discussed this briefly with @aturon, but I thought I would submit an issue to track the discussion.

I have been trying to implement an equivalent to Java's thread park / unpark using #[thread_local] but it requires being able to run some cleanup code when the thread exits. This currently isn't possible but should be with a little help from rust's thread support.

@pythonesque
Copy link
Contributor

Pretty sure this is a duplicate of issue #17572.

@thestinger
Copy link
Contributor

@carllerche: I have an implementation of TLS with support for lazy initialization and destruction and planned on landing an initial version and working on it in-tree. The initial work was in #17583 but that doesn't include the work I planned on landing in subsequent pull requests including destructors.

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

3 participants