Skip to content

Commit

Permalink
Auto merge of #123550 - GnomedDev:remove-initial-arc, r=Noratrieb
Browse files Browse the repository at this point in the history
Remove the `Arc` rt::init allocation for thread info

Removes an allocation pre-main by just not storing anything in std::thread::Thread for the main thread.
- The thread name can just be a hard coded literal, as was done in #123433.
- Storing ThreadId and Parker in a static that is initialized once at startup. This uses SyncUnsafeCell and MaybeUninit as this is quite performance critical and we don't need synchronization or to store a tag value and possibly leave in a panic.
  • Loading branch information
bors committed Oct 24, 2024
2 parents dad9b29 + 07f7ec0 commit 165db92
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 165db92

Please sign in to comment.