diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-09-30 21:53:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-30 21:53:32 +0200 |
| commit | 3e621b3dbf4e5e49378c33686bdbd48d30320a1f (patch) | |
| tree | 3b1db37574be9c50637691d4feb4c47d397faaac /compiler | |
| parent | 42d009c0a9be0f7020a03f85dd47faa00d6d7bdf (diff) | |
| parent | cbaec31c10c5eff7342e5273360521911fbf7631 (diff) | |
| download | rust-3e621b3dbf4e5e49378c33686bdbd48d30320a1f.tar.gz rust-3e621b3dbf4e5e49378c33686bdbd48d30320a1f.zip | |
Rollup merge of #143069 - jsimmons:current-thread-id-accessor, r=joshtriplett,tgross35
Add fast-path for accessing the current thread id Accessing the thread id is often used in profiling and debugging, as well as some approaches for sound single-threaded access to shared data. Currently the only way to access the thread id is by first obtaining a handle to the current thread. While this is not exactly slow, it does require an atomic inc-ref and dec-ref operation, as well as the injection of `Thread`'s drop code into the caller. This publicly exposes the existing fast-path for accessing the current thread id. edit: ACP: https://github.com/rust-lang/libs-team/issues/650
Diffstat (limited to 'compiler')
0 files changed, 0 insertions, 0 deletions
