Amanieu / thread_local-rs

Per-object thread-local storage for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Iter when T: Sync

Kestrer opened this issue · comments

Would it be possible to add a method that iterates over shared references to each thread's value when T: Sync?

This isn't possible because this would race with other threads adding new values, even if they are Sync.

Ok, makes sense.