3 ms·
> Anyone know of more? Rust's "tasks" feature isolated memory, and, thanks to the magic of linear types, passing data from one to another is both statically-gu
by kibwen 13y ago
> Anyone know of more?
Rust's "tasks" feature isolated memory, and, thanks to the magic of linear types, passing data from one to another is both statically-guaranteed to be safe and is never more expensive than the cost of copying a pointer.
- dbaupp 13y ago> is never more expensive than the cost of copying a pointer Well, if you're passing something that is pointer size, yes. But say, `chan.send([0u8, .. 1_000_000])` will do at least one 1 MB memcpy to load that into the stream, and a 1 MB memcpy to load it out of it when `.recv()` is called.