Files
rust/library/std/src/thread
Josh Simmons cbaec31c10 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 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.
2025-09-30 20:51:03 +02:00
..
2025-09-21 13:12:20 -04:00
2025-09-03 09:14:25 +02:00