3 ms·
> To have those guarantees the data would need to stored in an atomically reference counted structure (or something else with the same guarantees), which is jus
by Jweb_Guru 12y ago
> To have those guarantees the data would need to stored in an atomically reference counted structure (or something else with the same guarantees), which is just like you said.
That is not true.
`Send` is having its `'static` bound removed, so sharing data will no longer require reference counting for threads with bounded lifetime: https://github.com/rust-lang/rfcs/pull/458 https://github.com/rust-lang/rfcs/pull/458 (the RFC hasn't been officially accepted but it's been referenced as a foregone conclusion several times by Rust core team members).
There is already an experimental library exploiting this for `Sync` data, which includes immutable substructures: https://github.com/nikomatsakis/rayon https://github.com/nikomatsakis/rayon
The only reason people aren't more aware of this is because the functionality isn't exposed in the standard library yet. The language is perfectly capable.