Comment on Intrusive linked lists (2019)Comments−amelius8dNow try to do them in safe Rust.−afdbcreid8dEasy. https://docs.rs/intrusive-collections.−cryptonector8dThe issue is that back-links in data structures are inherently difficult to handle a thread-safe way in mutators.−afdbcreid6dNot more than regular collections (unless you mean working on different parts with different threads, then it's still possible but harder, just like with regular collections).−amelius8dImporting a library does not count. (Besides, perhaps you can tell but I don't even know if the library uses safe Rust internally.)−afdbcreid6dInternally? No. Externally? Yes. That is the point.−gbromios8dI'm no rust expert but isn't this sort of thing exactly what traits handle well?−steveklabnik8dNot directly relevant.−nick_8dAre the Rust devs not expanding the surface area of safe Rust over time? Just curious.−steveklabnik8dSort of but also no. Intrusive lists are not likely to ever be possible in safe code, almost by definition.
Comments
Now try to do them in safe Rust.
Easy. https://docs.rs/intrusive-collections.
The issue is that back-links in data structures are inherently difficult to handle a thread-safe way in mutators.
Not more than regular collections (unless you mean working on different parts with different threads, then it's still possible but harder, just like with regular collections).
Importing a library does not count. (Besides, perhaps you can tell but I don't even know if the library uses safe Rust internally.)
Internally? No. Externally? Yes. That is the point.
I'm no rust expert but isn't this sort of thing exactly what traits handle well?
Not directly relevant.
Are the Rust devs not expanding the surface area of safe Rust over time? Just curious.
Sort of but also no. Intrusive lists are not likely to ever be possible in safe code, almost by definition.