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

Improve rt cleanup and rt::thread::Thread #10662

Merged
merged 2 commits into from
Nov 27, 2013

Conversation

alexcrichton
Copy link
Member

This has one commit from a separate pull request (because these commits depend on that one), but otherwise the extra details can be found in the commit messages. The rt::thread module has been generally cleaned up for everyday safe usage (and it's a bug if it's not safe).

Whenever the runtime is shut down, add a few hooks to clean up some of the
statically initialized data of the runtime. Note that this is an unsafe
operation because there's no guarantee on behalf of the runtime that there's no
other code running which is using the runtime.

This helps turn down the noise a bit in the valgrind output related to
statically initialized mutexes. It doesn't turn the noise down to 0 because
there are still statically initialized mutexes in dynamic_lib and
os::with_env_lock, but I believe that it would be easy enough to add exceptions
for those cases and I don't think that it's the runtime's job to go and clean up
that data.
* Added doc comments explaining what all public functionality does.
* Added the ability to spawn a detached thread
* Added the ability for the procs to return a value in 'join'
bors added a commit that referenced this pull request Nov 27, 2013
This has one commit from a separate pull request (because these commits depend on that one), but otherwise the extra details can be found in the commit messages. The `rt::thread` module has been generally cleaned up for everyday safe usage (and it's a bug if it's not safe).
@bors bors closed this Nov 27, 2013
@bors bors merged commit 5d6dbf3 into rust-lang:master Nov 27, 2013
@alexcrichton alexcrichton deleted the thread-detach branch November 28, 2013 04:52
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.

2 participants