-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Move core::task::local_data to core::local_data #6306
Comments
Nominating backward compat. |
@graydon had some reservations about this. He is concerned that people should know whether they are getting task-local data or thread-local data. I don't think of it like that though - more as 'language-local' data. The language itself and a number of tightly integrated services expect access to 'local' things. This has always meant task-local in the past, but I am trying to make the required runtime as minimal as possible, primarily by factoring out these services in a way that they can be accessible without tasks. One of them is task-local data. It's possible that task-local data is not one of these requires services though (it's not as important as the heap) and could only be accessible from inside a task. We could also expose the API through two different paths so that you have to specify which one you want. We wouldn't do that for other local services though, e.g. |
Ah, the reason local data is required outside of tasks is because conditions use TLS and I/O uses conditions and I/O (the blocking implementations) should be usable outside of tasks. |
accepted for backwards-compatibility milestone |
Closing because of commit 6da2c98. |
add `internal-lints` feature to enable clippys internal lints (off by default) This PR moves the internal lint tests into a new subdirectory (I couldn't find a different way to compile-time-conditionally exclude them from compiletest) and only builds and tests internal lints if the `internal-lints` feature is enabled. Fixes rust-lang#6306 changelog: put internal lints behind a feature ("internal-lints")
Local data is probably going to be available outside of tasks.
The text was updated successfully, but these errors were encountered: