- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(thread_raw)]
This is a tracking issue for Thread::into_raw and Thread::from_raw.
These functions allow conversions between a Thread and a raw pointer, which is useful in concurrent code as it allows storing a Thread in an AtomicPtr.
Public API
// std::thread
impl Thread {
    fn into_raw(self) -> *const ();
    unsafe fn from_raw(ptr: *const ()) -> Thread;    
}Steps / History
-  ACP: ACP: add Thread::into_rawandThread::from_rawlibs-team#200
-  Implementation: Add Thread::{into_raw, from_raw}#97524
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Do we want to commit to guaranteeing that Threadcan always be represented as a pointer/integer?
zestererkennytm
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.