3 ms·
As someone that is interested in the topic and in Zig's "provide your own allocator" approach I have a question: would it be possible to make an allocator wrapp
by afiori 6y ago
As someone that is interested in the topic and in Zig's "provide your own allocator" approach I have a question: would it be possible to make an allocator wrapper that moves values to be deallocated to a different thread?
As far as I know it would require both Rust's borrowing semantics and Zig's architectural choice.
From purely my own fan-boy perspective Zig approach is something that I would have really liked for Rust to adopt (I have no idea of which one came first chronologically).
- steveklabnik 6y agoIt is not an allocator wrapper, but https://docs.rs/defer-drop/1.0.1/defer_drop/index.html https://docs.rs/defer-drop/1.0.1/defer_drop/index.html