thread_local-rs icon indicating copy to clipboard operation
thread_local-rs copied to clipboard

Would it be possible for `ThreadLocal` to return pinned references to the local data?

Open eggyal opened this issue 6 months ago • 6 comments

That is, could this library guarantee that the local data will not move until the ThreadLocal is dropped, permitting unsafe code to access the local data (using raw pointers) after the the borrow of the ThreadLocal itself expires?

eggyal avatar Dec 16 '23 19:12 eggyal