Closed
Description
I feel like this would provide the most ergonomic solution for working with both single-threaded and multi-threaded collections.
For a stack allocator, you'd pass &mut A
into the collection. For a collection like a shared hashmap, you'd use an allocator that supported concurrent allocations and pass in &A
. AllocRef
would be implemented for either &A
and &mut A
depending on if it was concurrent or not.
It's definitely possible I'm not seeing some downsides of this, but it seems like the best of both worlds to me.
See my reply lower down.
Metadata
Metadata
Assignees
Labels
No labels